-
Notifications
You must be signed in to change notification settings - Fork 331
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
Can't restore the dense feature map #248
Comments
Not sure anyone can help, but can you share your code? It might help see what is happening. |
############################## ####Creating a simple dense image data and zeroing out parts of the image to simulate sparse data dimension = 2 sparse_to_dense = scn.SparseToDense(dimension, 3) # 3 is the number of channels restored_image = restored_image.squeeze(0) ####Visualize original and recovered images plt.figure(figsize=(12, 6)) plt.subplot(1, 2, 2) plt.show() |
Looking at the code in https://github.com/facebookresearch/SparseConvNet/blob/main/sparseconvnet/sparseToDense.py and https://github.com/facebookresearch/SparseConvNet/blob/main/sparseconvnet/denseToSparse.py, it seems that the shapes expected and produced are not quite the same. I think you need to take this into account manually. |
Sorry, I am unable to maintain SparseConvNet any more. |
Ok, thank you very much for your friendly answers, I will try another solution based on your suggestions. |
Hello, thanks a lot for this great work. I have a question for you. When I use it on an image where some pixels are 0, I use scn.DenseToSparse to convert it to sparse input format, but when I don't do any processing and directly use scn.SparseToDense to restore this sparse tensor to the original dense tensor, it doesn't work as shown. I would like to ask what is the reason? Thanks a lot!!!
The text was updated successfully, but these errors were encountered: