模型搭建和參數優化

1.torch.nn 上一篇中咱們使用到了variable時,建立的類繼承的就是nn中的module,torch.nn包提供了不少神經網絡中具體功能相關的類,下面咱們使用nn來簡化以前的代碼python 剛開始的參數定義變化不大web import torch from torch.autograd import Variable batch_n=100 input_data=1000 hidde
相關文章
相關標籤/搜索