第一步
1 | sudo vim /etc/network/interfaces |
第二步 在iface eth0 inet static
添加下面
1 | dns-nameservers 8.8.8.8 8.8.4.4 |
第三步,重启
1 | sudo /etc/init.d/networking restart |
热爱平淡,向往未知
1 | import argparse |
不用加-, 是普通的参数列表
需要加-, 需要加参数名字的参数列表
1 | import torch |
要应该拼接起来
1 | y2 = torch.cat([ |
“—
title: 人脸识别的loss
date: 2018-08-16 17:42:27
tags:
—“


soft max比hard max更容易达到终极目标one-hot形式, 因为它大的会被放大
softmax鼓励不同类别的特征分开,但并不鼓励特征分离很多
(5,1,1,1)时loss就已经很小了,此时CNN接近收敛梯度不再下降
1 | out[out > 0] = 1 |
As your function’s derivative is 0 everywhere (except for the input 0, where it isn’t smooth), you can also implement it as a function:
pytorch
在backward的时候会删除计算图,
所以在backward的时候要加入参数 loss.backward(retain_graph=True)
输出的loss需要是一个值
loss.sum().backward()
1 | subprocess.call(cmd, shell=True, stdout=fp, executable="/bin/zsh") |