GeneFace
GeneFace copied to clipboard
執行CUDA_VISIBLE_DEVICES=0 python deep_3drecon/test.py 出現error
error 訊息:
Traceback (most recent call last):
File "/home/GeneFace/deep_3drecon/test.py", line 68, in
請問一下,這個問題該如何處理呢? 是我那個步驟有出錯嗎? 謝謝~
後來我發現把出錯那行裡面所提的那5個變數,全部轉型成為int資料型態就可以了,已解決!
@jerry4308 How did you resolve it, can you please explain
w0, h0, s, t[0], t[1]
I remember I just changed the type of the above variables as the same type.
^^
@jerry4308 can you be more precise
请问是在哪一步转换的呢,为什么我直接转换了还是报这个错?
try this code
trans_params = np.array([w0, h0, s, t[0][0], t[1][0]])
好的,谢谢~
Why this bug author has not fixed so far
You can do this to fix the problem.
output1 = s.item()
output2 = t.item(0)
output3 = t.item(1)
trans_params = np.array([w0, h0, output1, output2, output3])
try this code
trans_params = np.array([w0, h0, s, t[0][0], t[1][0]])
YES,this method works very well.