上一页 1 2 3 4 5 6 7 8 9 10 ··· 16 下一页
摘要: assert key.startswith('train') or key.startswith('eval') if type(value) == torch.Tensor: value = value.item() 阅读全文
posted @ 2022-05-28 20:59 呦呦南山 阅读(21) 评论(0) 推荐(0) 编辑
摘要: /home/zlf/anaconda3/envs/sac_ae_3.8/lib/python3.8/site-packages/torch/utils/tensorboard/__init__.py:4: DeprecationWarning: distutils Version classes a 阅读全文
posted @ 2022-05-28 19:30 呦呦南山 阅读(1677) 评论(0) 推荐(0) 编辑
摘要: 经检查,发现是数据集本身出问题了,更换数据集后,解决。 阅读全文
posted @ 2022-05-16 10:17 呦呦南山 阅读(239) 评论(0) 推荐(0) 编辑
摘要: torch.logsumexp的计算就是字面意思 但是自己实现的话发现单exp这一步输出就会出现溢出变成inf,就是无穷大发现函数里头的小技巧是进行了平移: 参考: 机器学习 - 计算 Log-Sum-Exp8. log_sum_exp的trick https://blog.csdn.net/qq_ 阅读全文
posted @ 2022-05-07 17:19 呦呦南山 阅读(516) 评论(0) 推荐(0) 编辑
摘要: This error will appear when LaTeX is unable to understand the command you may have used. doc.tex, line 5 LaTeX Error: Environment equation* undefined. 阅读全文
posted @ 2022-05-02 18:22 呦呦南山 阅读(1137) 评论(0) 推荐(0) 编辑
摘要: def to_array_as(x, y): if isinstance(x, torch.Tensor) and isinstance(y, np.ndarray): return x.detach().cpu().numpy().astype(y.dtype) elif isinstance(x 阅读全文
posted @ 2022-04-30 21:33 呦呦南山 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 配置强化学习常用的Atari环境时,出现以下错误:Exception: ROM is missing for xxxx, see https://github.com/openai/atari-py 方法一按照错误提示,我们进入此网页https://github.com/openai/atari-p 阅读全文
posted @ 2022-04-30 20:46 呦呦南山 阅读(448) 评论(0) 推荐(0) 编辑
摘要: def log_prob(self, value, pre_tanh_value=None): """ :param value: some value, x :param pre_tanh_value: arctanh(x) :return: """ if pre_tanh_value is No 阅读全文
posted @ 2022-04-27 21:14 呦呦南山 阅读(362) 评论(0) 推荐(0) 编辑
摘要: def sample(self, return_pretanh_value=False): """ Gradients will and should *not* pass through this operation. See https://github.com/pytorch/pytorch/ 阅读全文
posted @ 2022-04-27 20:32 呦呦南山 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 转载注明出处:PyTorch学习系列(十)--如何在训练时固定一些层? - CodeTutor - CSDN博客 Pytorch 保存和加载模型的代码: 保存模型: torch.save(net1.state_dict(), 'net_params.pkl') # 只保存神经网络的模型参数 与之对应 阅读全文
posted @ 2022-04-27 19:58 呦呦南山 阅读(791) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 16 下一页