赞
踩
目录
nn.Parameter
nn.Linear&nn.conv2d&nn.ReLU&nn.MaxPool2d(2))&nn.MSELoss等等
self.conv1 = nn.Conv2d(1,6,(5,5))
调用时: self.conv1(x)
layer = nn.Linear(1,1)
layer.weight = nn.Parameter(torch.FloatTensor([[0]]))
layer.bias = nn.Parameter(torch.FloatTensor([0]))
nn.functional
nn 与nn.functional有什么区别?
nn.Module
它是一个抽象概念,既可以表示神经网络中的某个层(layer) ,也可以表示一个包含很多层的神经网络
所有pytorch的nn库的网址:torch.nn — PyTorch 1.12 documentation
Parameters VS buffers
Facebook专门为Pytorch开发的一款可视化工具,开源于2017年3月,提供了大多数的科学运算可视化API: GitHub - fossasia/visdom: A flexible tool for creating, organizing, and sharing visualizations of live, rich data. Supports Torch and Numpy.
visdom的使用:
相关网站: https://github.com/pytorch/vision
https://pytorch.org/docs/master/torchvision/
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。