remove tmp variable

This commit is contained in:
Double_V 2021-06-09 19:30:52 +08:00 committed by GitHub
parent 616ad6a179
commit 962a628d17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -231,9 +231,7 @@ class GridGenerator(nn.Layer):
""" Return inv_delta_C which is needed to calculate T """ """ Return inv_delta_C which is needed to calculate T """
F = self.F F = self.F
hat_eye = paddle.eye(F, dtype='float64') # F x F hat_eye = paddle.eye(F, dtype='float64') # F x F
tmp1 = C.reshape([1, F, 2]) hat_C = paddle.norm(C.reshape([1, F, 2]) - C.reshape([F, 1, 2]), axis=2) + hat_eye
tmp2 = C.reshape([F, 1, 2])
hat_C = paddle.norm(tmp1 - tmp2, axis=2) + hat_eye
hat_C = (hat_C**2) * paddle.log(hat_C) hat_C = (hat_C**2) * paddle.log(hat_C)
delta_C = paddle.concat( # F+3 x F+3 delta_C = paddle.concat( # F+3 x F+3
[ [