只差一步

  • 首页

  • 分类5

  • 标签12

  • 归档8

  • 搜索

Note - Adversarial Dropout Regularization

发表于 2019-06-01 | 更新于 2019-06-03 | 分类于 Papernote
本文字数: 1.4k | 阅读时长 ≈ 1 分钟

Title

Saito, Kuniaki, et al. “Adversarial dropout regularization.” ICLR-18.

Motivation

现有的对抗domain adaption方法只将不同领域样本的特征区分开来,不能保证特征具有可判别性,因此当样本特征位于分类边界附近时就会失效。原来的对抗domain adaptation方法包含两个空间,一个是任务的分类空间,另一个是领域特征的空间,判别器只能在领域特征空间区别特征,因此生成器的生成的特征也仅仅是领域可判别,而无法保证分类可判别。当目标领域样本处于分类边界附近时,模型仍然会失效。而处于分类边界的样本,对分类边界的变化应当是很敏感的,这可以直接反映在概率分布的变化上。远离分类边界的样本,概率分布相对稳定;靠近分类边界的样本,概率分布容易随着分类边界的变化产生明显改变。

阅读全文 »

Shell - Using Trap to Catch and Handle Signals

发表于 2019-06-01 | 分类于 Programming , Shell
本文字数: 542 | 阅读时长 ≈ 1 分钟

trap command is a function of the shell to handle signals.

Basic examples:

example
1
2
3
4
5
6
trap arg signal_spec ... # signal_spec can be either SIGINT like string or a number for that signal, the "SIG" is not required
trap 'echo "Ctrl-C captured"' INT # when pressing Ctrl-C, echo the string and continue running
trap 'echo "Ctrl-C captured"; exit' INT # when pressing Ctrl-C, echo the string and exit
trap '' INT # ignroe INT signal, proceed even when you press Ctrl-C
trap INT # reset handlers for INT signal
trap '-' INT # reset handlers for INT signal

Shell - Always Be Conscious of Redirecting to an Existing File

发表于 2019-06-01 | 更新于 2019-06-02 | 分类于 Programming , Shell
本文字数: 698 | 阅读时长 ≈ 1 分钟

The basic principle is to avoid output redirection’s default behavior to overwrite an existing file.

An existing file might be a link pointing to some other files, either hard or symbolic. You need to be absolutely sure whether it is a link or whether there are links pointing to it.

Overriding a “link” alters the actual data storage and all the links linking to this data storage will be affected, thus comes with potenially unwanted behaviors.

阅读全文 »

Shell - Array and Loop

发表于 2019-06-01 | 更新于 2019-06-02 | 分类于 Programming , Shell
本文字数: 1.2k | 阅读时长 ≈ 1 分钟

Array Operations

Indexing

Shell array uses 0-based indexing.

Basically, shell array indexing follows the syntax:

syntax
1
2
${A[I]} # index a single element
${A[@]:I:N} # take a slice with N elements, starting from I-th element

Let’s take a look at a few pratical use cases.

阅读全文 »

Windows 常用工具集合

发表于 2019-05-31 | 更新于 2019-06-02 | 分类于 Resources
本文字数: 918 | 阅读时长 ≈ 1 分钟

无障碍(为系统提供额外功能,特点是功能单一,且目的明确)

  • Executor,提供快捷访问
  • Strokes Plus,全局手势
  • Everything,文件搜索
阅读全文 »

Numpy Storage

发表于 2019-05-31 | 更新于 2019-06-01 | 分类于 Programming
本文字数: 502 | 阅读时长 ≈ 1 分钟

The following code snippet demonstrates the way to determine whether a Numpy array points to an actual storage in memory, or holding a view of another array.

1
2
3
4
5
6
7
8
9
10
11
12
13
x = numpy.random.rand(3, 5)
print(x.flags.owndata) # True,真实数组
y = x.reshape((5,3))
print(y.flags.owndata) # False, y is a view of x
print(y.base is x) # True,y holds a reference to x

def find_base_nbytes(a):
"""
get actual number of bytes for array a
"""
if a.base is not None:
return find_base_nbytes(a.base)
return a.nbytes

Pjax: PushState + Ajax

发表于 2019-05-30 | 更新于 2019-06-02 | 分类于 Programming , Javascript
本文字数: 271 | 阅读时长 ≈ 1 分钟

pjax

pjax = PushState + ajax

pjax不能在本地测试,因为通过xhttprequest对本地文件发起的访问请求,会因CORS策略而受到屏蔽。

阅读全文 »

Guides to Hexo

发表于 2019-05-30 | 更新于 2019-06-02 | 分类于 Resources
本文字数: 615 | 阅读时长 ≈ 1 分钟

Hexo 建站指南

安装hexo

1
npm install -g hexo-cli
阅读全文 »
pluiefox

pluiefox

8 日志
5 分类
12 标签
0%
© 2019 pluiefox | 6k | 6 分钟