上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 106 下一页
摘要: 1.问题 https://discuss.pytorch.org/t/why-dont-we-put-models-in-train-or-eval-modes-in-dcgan-example/7422 链接中问题当在生成时,如果将generator状态设置为eval(),那么就会模式坍缩,只生成 阅读全文
posted @ 2021-04-09 18:05 lypbendlf 阅读(531) 评论(0) 推荐(0)
摘要: 1.原理 转自:https://zhuanlan.zhihu.com/p/44169714 https://blog.csdn.net/weixin_30566111/article/details/95351782,这里提到了第四点: 2.推导 W距离用在了什么地方? https://www.cn 阅读全文
posted @ 2021-04-07 16:32 lypbendlf 阅读(326) 评论(0) 推荐(0)
摘要: 1.torch.utils.data.random_split() pytorch有多种方法划分,但这个是最简单的。 转自:https://www.cnblogs.com/marsggbo/p/10496696.html train_size = int(0.8 * len(full_dataset 阅读全文
posted @ 2021-04-05 04:13 lypbendlf 阅读(4617) 评论(0) 推荐(0)
摘要: 1.nohup和&的使用 https://www.cnblogs.com/jinxiao-pu/p/9131057.html nohup command > myout.file 2>&1 & 在上面的例子中,0 – stdin (standard input),1 – stdout (standa 阅读全文
posted @ 2021-04-05 02:38 lypbendlf 阅读(78) 评论(0) 推荐(0)
摘要: 转自:https://blog.csdn.net/liweibin1994/article/details/77374854 1.可迭代对象 当一个类实现了__iter__()和__next__()之后,它就是一个可迭代对象, class test(): def __init__(self,data 阅读全文
posted @ 2021-04-05 00:17 lypbendlf 阅读(66) 评论(0) 推荐(0)
摘要: 1.写到一个类别下 https://www.pythonheidong.com/blog/article/674750/850e5ee9aa39c1d29ff5/ from torch.utils.tensorboard import SummaryWriter import numpy as np 阅读全文
posted @ 2021-04-04 23:38 lypbendlf 阅读(5456) 评论(0) 推荐(0)
摘要: 1.作用 运行model.eval()后批归一化层和dropout层就不会在推断时有效果。如果没有做的话,就会产生不连续的推断结果。 2.model.eval()和with torch.no_grad() https://discuss.pytorch.org/t/model-eval-vs-wit 阅读全文
posted @ 2021-04-04 16:29 lypbendlf 阅读(3283) 评论(0) 推荐(0)
摘要: 转自:https://blog.csdn.net/qq_39938666/article/details/88809726 1.相同点 两者的公式都是这样的。 2.torch.nn.Sigmoid() 它是一个网络层的class类(首字母为大写的),需要先初始化一个网络层,然后forward输入进参 阅读全文
posted @ 2021-04-04 16:19 lypbendlf 阅读(2399) 评论(0) 推荐(0)
摘要: https://zhuanlan.zhihu.com/p/38056115 链接中内容包括: 保存模型与加载模型 冻结一部分参数,训练另一部分参数 采用不同的学习率进行训练 1.保存与加载模型 //保存整个网络 torch.save(net, PATH) net=torch.load(PATH) / 阅读全文
posted @ 2021-04-03 01:42 lypbendlf 阅读(70) 评论(0) 推荐(0)
摘要: 转自:https://wenku.baidu.com/view/174207db84254b35eefd3453.html https://zhidao.baidu.com/question/326390456558372525.html 阅读全文
posted @ 2021-04-02 21:38 lypbendlf 阅读(132) 评论(0) 推荐(0)
上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 106 下一页