Skip to content

Commit 5a50f68

Browse files
authored
Merge pull request #3650 from Wovchena/fix-RuntimeError-view-size-is-not-compatible-with-input-tensors-size-and-stride
Fix test: RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces)
2 parents 418308a + a89aade commit 5a50f68

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)