Closed dontLoveBugs closed 5 years ago
This is independent of the version of pytorch. I guess you used python3, In python3 the default types output from div is float. My configuration is python2 + pytorch0.3. So If you use python3, you could add int() to convert the type from float to int.
`
x = self.gud_up_proj_layer4(x, skip4) # 64 channels features x= self.gud_up_proj_layer5(x) # blur depth guidance = self.gud_up_proj_layer6(x) # affinity matrix x = self.post_process_layer(guidance, x, sparse_depth)
` I think the first x is 64 channels features, which are used to generate blur depth and affinity matrix, and the second x is blur depth. Therefore, the input of self.gud_up_proj_layer6 is the first x. I modify the code as follows:
`
x = self.gud_up_proj_layer4(x, skip4) blur_depth = self.gud_up_proj_layer5(x) guidance = self.gud_up_proj_layer6(x) x = self.post_process_layer(guidance, blur_depth, sparse_depth)
I also find this bug. Can you double-check it? @XinJCheng Thanks!
`
` I think the first x is 64 channels features, which are used to generate blur depth and affinity matrix, and the second x is blur depth. Therefore, the input of self.gud_up_proj_layer6 is the first x. I modify the code as follows:
`
` And I find the cspn.py have the following errors.
So, I suggest replace '/'(div operation) using '//' when you want to get 'int' rather than 'float'.