Skip to content
代码片段 群组 项目
提交 d6d527c4 编辑于 作者: Toshihiro Nakae's avatar Toshihiro Nakae
浏览文件

remove tail spaces, Japanse comments

上级 c26b3ae9
无相关合并请求
...@@ -18,16 +18,16 @@ At initialize, you have to specify next 4 variables at least. ...@@ -18,16 +18,16 @@ At initialize, you have to specify next 4 variables at least.
- ``comp_hiddens`` : list of int - ``comp_hiddens`` : list of int
- sizes of hidden layers of compression network - sizes of hidden layers of compression network
- For example, if the sizes are ``[n1, n2]``, - For example, if the sizes are ``[n1, n2]``,
structure of compression network is: structure of compression network is:
``input_size -> n1 -> n2 -> n1 -> input_sizes`` ``input_size -> n1 -> n2 -> n1 -> input_sizes``
- ``comp_activation`` : function - ``comp_activation`` : function
- activation function of compression network - activation function of compression network
- ``est_hiddens`` : list of int - ``est_hiddens`` : list of int
- sizes of hidden layers of estimation network. - sizes of hidden layers of estimation network.
- The last element of this list is assigned as n_comp. - The last element of this list is assigned as n_comp.
- For example, if the sizes are ``[n1, n2]``, - For example, if the sizes are ``[n1, n2]``,
structure of estimation network is: structure of estimation network is:
``input_size -> n1 -> n2 (= n_comp)`` ``input_size -> n1 -> n2 (= n_comp)``
- ``est_activation`` : function - ``est_activation`` : function
- activation function of estimation network - activation function of estimation network
......
...@@ -72,7 +72,7 @@ class CompressionNet: ...@@ -72,7 +72,7 @@ class CompressionNet:
# Based on the original paper, features of reconstraction error # Based on the original paper, features of reconstraction error
# are composed of these loss functions: # are composed of these loss functions:
# 1. loss_E : relative Euclidean distance # 1. loss_E : relative Euclidean distance
# 2. loss_C : cosine similarity -> ★★★ 生の cosine か、1から引くのか? # 2. loss_C : cosine similarity
min_val = 1e-3 min_val = 1e-3
loss_E = dist_x / (norm_x + min_val) loss_E = dist_x / (norm_x + min_val)
loss_C = 0.5 * (1.0 - dot_x / (norm_x * norm_x_dash + min_val)) loss_C = 0.5 * (1.0 - dot_x / (norm_x * norm_x_dash + min_val))
......
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册