zRzRzRzRzRzRzR commited on
Commit
9a7a028
1 Parent(s): 8ba56be

use reshape

Browse files
Files changed (1) hide show
  1. visual.py +1 -1
visual.py CHANGED
@@ -70,7 +70,7 @@ class Attention(nn.Module):
70
  out = attention_fn_default(
71
  q, k, v
72
  )
73
- output = self.dense(out.transpose(1, 2).view(B, L, -1))
74
  output = self.output_dropout(output)
75
  return output
76
 
 
70
  out = attention_fn_default(
71
  q, k, v
72
  )
73
+ output = self.dense(out.transpose(1, 2).reshape(B, L, -1))
74
  output = self.output_dropout(output)
75
  return output
76