"doc/git@developer.sourcefind.cn:wangsen/paddle_dbnet.git" did not exist on "04378dc1e3a58f59f4fab06d0cfebaf698425970"
Unverified Commit 962a628d authored by Double_V's avatar Double_V Committed by GitHub
Browse files

remove tmp variable

parent 616ad6a1
...@@ -231,9 +231,7 @@ class GridGenerator(nn.Layer): ...@@ -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
[ [
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment