gaur3009 commited on
Commit
dfd5718
·
verified ·
1 Parent(s): b314508

Update networks.py

Browse files
Files changed (1) hide show
  1. networks.py +2 -1
networks.py CHANGED
@@ -128,7 +128,8 @@ class FeatureRegression(nn.Module):
128
 
129
  def forward(self, x):
130
  x = self.conv(x)
131
- x = x.view(x.size(0), -1)
 
132
  x = self.linear(x)
133
  x = self.tanh(x)
134
  return x
 
128
 
129
  def forward(self, x):
130
  x = self.conv(x)
131
+ # Change view() to reshape() and make contiguous
132
+ x = x.contiguous().view(x.size(0), -1)
133
  x = self.linear(x)
134
  x = self.tanh(x)
135
  return x