使用PyTorch框架结合Visdom工具实现神经网络模型(尤其是CNN结构)来完成手写字体分类任务。
发布时间
阅读量:
阅读量
运行环境
操作系统:Windows 10
处理器:Intel i7-6700HQ
显卡:NVIDIA GTX 965M
Python 版本:3.6
PyTorch 版本:0.3
普通神经网络概述
class Nueralnetwork(nn.Module):
def __init__(self,in_dim,hidden1,hidden2,out_dim):
super(Nueralnetwork, self).__init__()
self.layer1 = nn.Linear(in_dim,hidden1)
self.layer2 = nn.Linear(hidden1,hidden2)
self.layer3 = nn.Linear(hidden2,out_dim)
def forward(self,x):
x = self.layer1(x)
x = self.layer2(x)
x = self.layer3(x)
return x
net = Nueralnetwork(28*28,200,100,1
全部评论 (0)
还没有任何评论哟~
