Questions tagged «torch»

8
PyTorch中的“视图”方法如何工作?
我对方法感到困惑 view()对以下代码片段中。 class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.conv1 = nn.Conv2d(3, 6, 5) self.pool = nn.MaxPool2d(2,2) self.conv2 = nn.Conv2d(6, 16, 5) self.fc1 = nn.Linear(16*5*5, 120) self.fc2 = nn.Linear(120, 84) self.fc3 = nn.Linear(84, 10) def forward(self, x): x = self.pool(F.relu(self.conv1(x))) x = self.pool(F.relu(self.conv2(x))) x = x.view(-1, 16*5*5) x = F.relu(self.fc1(x)) x …
205 python  memory  pytorch  torch  tensor 


4
错误:桶/桶已移动。轻按自制/酒桶-酒桶
我尝试完成安装过程 在MacOs Catalina上 Github的 第一步是在终端中执行: cd ~/ curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash 但我得到错误: Error: caskroom/cask was moved. Tap homebrew/cask-cask instead. 然后我尝试了: brew tap caskroom/cask 但是我遇到了同样的错误。你有什么建议吗?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.