Spaces:
Runtime error
Runtime error
Update codes.py
Browse files
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])
|
| 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])
|
| 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
|