Update transformation.py
This commit is contained in:
parent
78d7ed96a9
commit
134451267f
|
@ -32,7 +32,7 @@ class TPS_SpatialTransformerNetwork(nn.Module):
|
|||
build_P_prime_reshape = build_P_prime.reshape([build_P_prime.size(0), self.I_r_size[0], self.I_r_size[1], 2])
|
||||
|
||||
if torch.__version__ > "1.2.0":
|
||||
batch_I_r = F.grid_sample(batch_I, build_P_prime_reshape, padding_mode='border', align_corner=True)
|
||||
batch_I_r = F.grid_sample(batch_I, build_P_prime_reshape, padding_mode='border', align_corners=True)
|
||||
else:
|
||||
batch_I_r = F.grid_sample(batch_I, build_P_prime_reshape, padding_mode='border')
|
||||
|
||||
|
|
Loading…
Reference in New Issue