question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inputs must be sparse tensors when processing raw eval data

See original GitHub issue

Hi! Thanks for sharing your very promising work!

I’m trying to follow your instructions to download and process (feature extraction) your evaluation data. However when calling extract_data.py as in your example, I’m getting the following output:

2020-07-13 15:09:05 824982bf9848 root[13462] INFO Starting feature extraction
2020-07-13 15:09:05 824982bf9848 root[13462] INFO ['./data/eval_data/3d_match/raw_data/kitchen', './data/eval_data/3d_match/raw_data/sun3d-home_at-home_at_scan1_2013_jan_1', './data/eval_data/3d_match/raw_data/sun3d-home_md-home_md_scan9_2012_sep_30', './data/eval_data/3d_match/raw_data/sun3d-hotel_uc-scan3', './data/eval_data/3d_match/raw_data/sun3d-hotel_umd-maryland_hotel1', './data/eval_data/3d_match/raw_data/sun3d-hotel_umd-maryland_hotel3', './data/eval_data/3d_match/raw_data/sun3d-mit_76_studyroom-76-1studyroom2', './data/eval_data/3d_match/raw_data/sun3d-mit_lab_hj-lab_hj_tea_nov_2_2012_scan1_erika']
2020-07-13 15:09:05 824982bf9848 root[13462] INFO 0 / 60: kitchen_000
/content/drive/My Drive/Dev/DL/colab_data/3D_multiview_reg/scripts/utils.py:118: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
  coords = torch.tensor(coords, dtype=torch.int32)

Traceback (most recent call last):
  File "./scripts/extract_data.py", line 363, in <module>
    logger.info('Feature extraction completed')
  File "./scripts/extract_data.py", line 88, in extract_features_batch
    
  File "/content/drive/My Drive/Dev/DL/colab_data/3D_multiview_reg/scripts/utils.py", line 125, in extract_features
    return return_coords, model(stensor).F
  File "/usr/local/envs/lmpr/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in __call__
    result = self.forward(*input, **kwargs)
  File "/content/drive/My Drive/Dev/DL/colab_data/3D_multiview_reg/lib/descriptor/fcgf.py", line 257, in forward
    out = ME.cat((out_s4_tr, out_s4))
  File "/usr/local/envs/lmpr/lib/python3.6/site-packages/MinkowskiEngine-0.4.3-py3.6-linux-x86_64.egg/MinkowskiEngine/MinkowskiOps.py", line 67, in cat
    assert isinstance(s, SparseTensor), "Inputs must be sparse tensors."
AssertionError: Inputs must be sparse tensors.

Do you have an idea why I’m seeing this or am I missing something?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
zgojciccommented, Jul 15, 2020

Thanks Jaykob, I am sorry for the small bugs, guess this is what happens when one publishes only part of the code 😃

You are completely right on all three points. I have changed __init__.py and config.py accordingly and updated Readme.md such that the call only contains one 3d_match.

The error that you are getting after changing all is probably because you tried running the jupyter notebook in the raw_data folder which created the .ipynb_checkpoints folder. Out code scans the raw_data folder and assumes that each folder in it represent a different scene, which has to contain the gt.log file in order to make the comparison.

Short answer: removing the .ipynb_checkpoints folder should do the trick.

If you find any other problems please feel free to either report them here or open a new issue 😃 Thank you again.

2reactions
zgojciccommented, Jul 14, 2020

Hi, thanks for opening this issue, indeed it seems that there was a small bug in the fcgf code (to many brackets, probably a version issue). This should be fixed in commit 5a29912e37d8840376284269b751fd7f53efa347.

Could you please try it out and let me know if it fixes your problem.

Zan

Read more comments on GitHub >

github_iconTop Results From Across the Web

Working with sparse tensors | TensorFlow Core
The example below shows you how to pass a sparse tensor as an input to a Keras model if you use only layers...
Read more >
How to use list of sparse tensors in tf.data.Dataset?
I'm familiar with using pytorch, and it is very easy to feed sparse tensor into the network. However I found that I have...
Read more >
Automatic Generation of Efficient Sparse Tensor ... - YouTube
Your browser can't play this video. Learn more. Switch camera.
Read more >
Efficient Processing of Sparse Tensor Decomposition via ...
1: Tensor contraction and tensor decomposition. One attractive solution is the sparse tensor decomposition. (SpTD). Given a sparse input tensor, usually, ...
Read more >
An Analytical Approach To Sparse Tensor Accelerator Modeling
Processing speed and energy efficiency of architectures with different data representation support running sparse matrix multiplication workloads. Design ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found