Amould commited on
Commit
1cf063b
·
verified ·
1 Parent(s): 29e09a6

Update codes.py

Browse files
Files changed (1) hide show
  1. codes.py +2 -2
codes.py CHANGED
@@ -104,12 +104,12 @@ def mtrx3(Affine_mtrx):
104
  mtrx_shape = Affine_mtrx.shape
105
  if len(mtrx_shape)==3:
106
  N_Mbatches = mtrx_shape[0]
107
- AM3 = torch.zeros( [N_Mbatches,3,3]).to(device)
108
  AM3[:,0:2,:] = Affine_mtrx
109
  AM3[:,2,2] = 1
110
  elif len(mtrx_shape)==2:
111
  N_Mbatches = 1
112
- AM3 = torch.zeros([3,3]).to(device)
113
  AM3[0:2,:] = Affine_mtrx
114
  AM3[2,2] = 1
115
  return AM3
 
104
  mtrx_shape = Affine_mtrx.shape
105
  if len(mtrx_shape)==3:
106
  N_Mbatches = mtrx_shape[0]
107
+ AM3 = torch.zeros( [N_Mbatches,3,3])#.to(device)
108
  AM3[:,0:2,:] = Affine_mtrx
109
  AM3[:,2,2] = 1
110
  elif len(mtrx_shape)==2:
111
  N_Mbatches = 1
112
+ AM3 = torch.zeros([3,3])#.to(device)
113
  AM3[0:2,:] = Affine_mtrx
114
  AM3[2,2] = 1
115
  return AM3