Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I test your code in PyTorch0.4.1 and find some bugs #9

Closed
dontLoveBugs opened this issue Dec 6, 2018 · 2 comments
Closed

I test your code in PyTorch0.4.1 and find some bugs #9

dontLoveBugs opened this issue Dec 6, 2018 · 2 comments

Comments

@dontLoveBugs
Copy link

`

    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)

`
And I find the cspn.py have the following errors.

IndexError: only integers, slices (:), ellipsis (...), None and long or byte Variables are valid indices (got float)

So, I suggest replace '/'(div operation) using '//' when you want to get 'int' rather than 'float'.

@XinJCheng
Copy link
Owner

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.

@sshan-zhao
Copy link

`

    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants