Noisy warning raised by the collate function
See original GitHub issue🐛 Describe the bug
After upgrading to PyTorch 1.12, I got the following warnings while collating data:
/opt/conda/lib/python3.8/site-packages/torch_geometric/data/collate.py:150: UserWarning: A
n output with one or more elements was resized since it had shape [58791], which does not
match the required output shape [19597, 3]. This behavior is deprecated, and in a future P
yTorch release outputs will not be resized unless they have zero elements. You can explici
tly reuse an out tensor t by resizing it, inplace, to zero elements with t.resize_(0). (Tr
iggered internally at ../aten/src/ATen/native/Resize.cpp:17.)
value = torch.cat(values, dim=cat_dim or 0, out=out)
I guess the cause is the same as this one https://github.com/pytorch/pytorch/issues/71063 for PyTorch. Their fix is directly applicable to PyG.
Environment
- PyG version: 2.0.4
- PyTorch version: 1.12.0
- OS: Ubuntu
- Python version: 3.8.10
- CUDA/cuDNN version: 11.3
- How you installed PyTorch and PyG (
conda
,pip
, source): pip - Any other relevant information (e.g., version of
torch-scatter
):
Issue Analytics
- State:
- Created a year ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Noisy warning raised by 'default_collate' · Issue #71063
In case default_collate runs in background/worker process (torch.utils.data.get_worker_info() returns something), out is always a 1D tensor, but ...
Read more >transform noise words Server Configuration Option
Noise words (or stopwords) are not transformed. When a full-text query contains noise words, the query returns zero rows, and SQL Server raises ......
Read more >Source code for opacus.data_loader
Args: collate_fn: collate function to wrap sample_empty_shapes: expected shape for a batch of size 0. Input is a sequence - one for each...
Read more >PyTorch Datasets — lhotse 1.12.0.dev documentation
These Dataset 's expect to be handed lists of element indices, so that they can collate the data before it is passed to...
Read more >On the definition of noise | Humanities and Social Sciences ...
I believe that noise is inevitable in today's environment…” Human. (1). People who raise their voices in inappropriate scenarios should promote ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jangkj09 There is a nightly package on PyPI. But you may still need a working compiler to install it.
Thanks!