相关疑难解决方法(0)

如何在Pytorch的`nn.Sequential`中变平输入

如何扁平化内部的输入 nn.Sequential

Model = nn.Sequential(x.view(x.shape[0],-1),
                     nn.Linear(784,256),
                     nn.ReLU(),
                     nn.Linear(256,128),
                     nn.ReLU(),
                     nn.Linear(128,64),
                     nn.ReLU(),
                     nn.Linear(64,10),
                     nn.LogSoftmax(dim=1))
Run Code Online (Sandbox Code Playgroud)

python artificial-intelligence neural-network pytorch

5
推荐指数
3
解决办法
2470
查看次数