pytorch
remanented
勤思考,哈工大在读硕士。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
pytorch中对神经网络模型中的参数进行初始化
一、目前在尝试各种方法来训练自己的模型,希望能够得到较好的training_model,包括了对模型的初始化,记录一下代码部分: from torch.nn import init #define the initial function to init the layer's parameters for the network def weigth_init(m): if isin...原创 2019-04-10 14:47:56 · 8056 阅读 · 1 评论 -
pytorch 下自定义激活函数与多GPU训练
一、在解决一些实际问题时,pytorch中自带的激活函数可能不能满足需求,就需要自定义一些激活函数,比如我需要一个使得输出值在0到140之间的激活层,pytorch中不含有,所以自定义: #define a self activation function class Act_fun(nn.Module): def __init__(self): super(Act_...原创 2019-04-08 10:29:17 · 2523 阅读 · 0 评论
分享