epic客户端设置socks5代理
目前epic客户端已经支持socks5代理校园网免流了,赶紧动起来~ 打开设置,然后找到代理,填入: socks5://127.0.0.1:1080 这样就能加速下载了。 本文最后更新于2022年1月12日,已超过 1 年没有更新,如果文章 […]
Mac端epic的存档位置
Windows端的epic可以自动同步存档,但是Mac端的好像不行。。只能手动备份了。 以火炬之光2为例,地址在: /Users/mcj/Library/Application Support/Runic Games/Torchlight […]
Gitee如何同时添加多个SSH Key
tag:bash git ssh 生成一个公司用的SSH-Key: ssh-keygen -t rsa -C ‘xxxxx@company.com’ -f ~/.ssh/id_rsa 生成一个个人用的SSH-Key: ssh-keygen […]
如何查看服务器的实时流量以及连接IP
某段时间,服务器被人攻击,出现异常流量,为了取证,所以需要获取攻击者的IP信息。 yum install -y nethogs 安装之后直接输入:nethogs 本文最后更新于2022年1月4日,已超过 1 年没有更新,如果文章内容或图片资 […]
ioctl failed while establishing local IP for selected device veth3XIJPP. You may specify the device on the command line.
查看服务器实时流量的时候,可能会报错: ioctl failed while establishing local IP for selected device veth3XIJPP. You may specify the device […]
阿里云服务器安装Docker
安装步骤: sudo setenforce 0 sudo sed -i ‘/^SELINUX=/c\SELINUX=disabled’ /etc/selinux/config wget http://mirrors.sohu.com/fed […]
如何对numpy数组可视化?如何将numpy数组保存为图片?
推荐使用matplotlib:
1 2 3 |
import matplotlib matplotlib.image.imsave('xxx.png', array) |
这是对应解释:
1 2 3 4 5 6 7 |
Arguments: *fname*: A string containing a path to a filename, or a Python file-like object. If *format* is *None* and *fname* is a string, the output format is deduced from the extension of the filename. *arr*: An MxN (luminance), MxNx3 (RGB) or MxNx4 (RGBA) array. |
保存的图片类似彩图。 当然,OpenCV也行: [crayo […]
如何在一台全新的机器上一键运行flexget等功能?
标签:conda flexget git pypi python python3 定时 标签 本文为私人安装指导,主要是方便下次重新部署。 如何在一台全新的机器上一键运行flexget等功能? 目前的脚本功能包括: 自动下载种子,并可在添加 […]
Pytorch如何手动调整学习率或者自动动态调整学习率
手动 举个例子:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
... optimizer = optim.SGD(para_optim, lr=0.001, momentum=0.9, weight_decay=0.0002) def adjust_learning_rate(optimizer, epoch): lr = optimizer.param_groups[0]['lr'] * 0.1 #学习率每个epoch乘以0.1 #lr = opt.lr * (0.1 ** (epoch // opt.step)) #学习率没10个epoch乘以0.1 return lr def train(net, optimizer): for epoch in range(epoch_nums): lr = adjust_learning_rate(optimizer, epoch-1) for param_group in optimizer.param_groups: param_group["lr"] = lr print('-----------learning rate', optimizer.param_groups[0]["lr"]) net.train() for batch_idx, (inputs, targets) in enumerate(trainloader): ... |
自动 a. 有序调整:等间隔调整(Step),按需调整学习率(MultiStep),指数衰减调整(Exponential)和 余弦退火CosineAnnea […]
imazing无法读取旧备份文件
一段时间imazing一直无法读取之前备份的文件,一直提示需要授权。但其实已经在设置里授予全盘读写的权限了。 跟官网联系了很多次,对方也不知道咋回事。 后来才发现,原来是备份的位置中有一个位置是不存在的,所以每次开启的时候都提示无法读取。 […]