0%

先找到

1
tmux list-panes -a -F "#{pane_pid} #{pane_id}" | grep ^PID

但是发现无法找到,查阅man手册发现pane_pid PID of first process in pane

所以找到tty编号pts/159

1
2
ps aux |  grep 12934 | grep -v grep
me 12934 1.5 0.1 23917648 80292 pts/159 Sl+ Aug19 15:00 python train.py

然后找对应session name

1
2
tmux list-panes -a -F "#{pane_pid} #{pane_tty} sname:#{session_name} widx:#{window_index} pidx:#{pane_index}"  |  grep pts/159
31425 /dev/pts/159 sname:49 widx:3 pidx:1

https://man.cx/tmux

测试发现自带的调用一次需要0.1s………

自带的mse loss计算慢,自定义一个

1
2
3
4
def self_mseloss(y_input, y_target):
num = torch.numel(y_input)
mse_loss = torch.sum((y_input - y_target) ** 2)
return mse_loss / num

满屏的NaN gradient, 最后发现是因为sqrt 0的位置是没有导数的,写代码还需时刻查看是否可导

~/.pip/pip.conf

1
2
3
4
5
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/

[install]
trusted-host=mirrors.aliyun.com

第一步

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