Skip to content

Commit a89aade

Browse files
committed
Fix test: RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces)
1 parent 418308a commit a89aade

File tree

1 file changed

+1
-1
lines changed
  • tools/accuracy_checker/data/test_models/pytorch_model

1 file changed

+1
-1
lines changed

tools/accuracy_checker/data/test_models/pytorch_model/samplenet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def __init__(self):
3131
def forward(self, x):
3232
x = self.pool(F.relu(self.conv1(x)))
3333
x = self.pool(F.relu(self.conv2(x)))
34-
x = x.view(-1, 16 * 5 * 5)
34+
x = x.flatten(start_dim=1)
3535
x = F.relu(self.fc1(x))
3636
x = F.relu(self.fc2(x))
3737
x = self.fc3(x)

0 commit comments

Comments
 (0)