tamarott / SinGAN

Official pytorch implementation of the paper: "SinGAN: Learning a Generative Model from a Single Natural Image"
https://tamarott.github.io/SinGAN.htm
Other
3.29k stars 608 forks source link

Error: Providing a bool or integral fill value without setting the optional `dtype` or `out` arguments is currently unsupported #162

Open rinskeal opened 2 years ago

rinskeal commented 2 years ago

Hi all,

I'm trying to get a graph neural network code to run on a cluster (where the code that I used, always used to work perfectly fine up to half a year ago). I have the following versions:

python 3.6.9 torch 1.6.0 torch-geometric 2.0.3 torch-scatter 2.0.5 torch-sparse 0.6.8 torchvision 0.7.0

If I run the code, I get the following error:

Traceback (most recent call last): File "GNN_20210503_alltimes_trainsep.py", line 442, in for train in train_dataloader: File "/home/alkemade/.conda/envs/ML8/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 363, in next data = self._next_data() File "/home/alkemade/.conda/envs/ML8/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 403, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "/home/alkemade/.conda/envs/ML8/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch return self.collate_fn(data) File "/home/alkemade/.conda/envs/ML8/lib/python3.7/site-packages/torch_geometric/loader/dataloader.py", line 20, in call self.exclude_keys) File "/home/alkemade/.conda/envs/ML8/lib/python3.7/site-packages/torch_geometric/data/batch.py", line 75, in from_data_list exclude_keys=exclude_keys, File "/home/alkemade/.conda/envs/ML8/lib/python3.7/site-packages/torch_geometric/data/collate.py", line 109, in collate out_store.batch = repeat_interleave(repeats, device=device) File "/home/alkemade/.conda/envs/ML8/lib/python3.7/site-packages/torch_geometric/data/collate.py", line 205, in repeat_interleave outs = [torch.full((n, ), i, device=device) for i, n in enumerate(repeats)] File "/home/alkemade/.conda/envs/ML8/lib/python3.7/site-packages/torch_geometric/data/collate.py", line 205, in outs = [torch.full((n, ), i, device=device) for i, n in enumerate(repeats)] RuntimeError: Providing a bool or integral fill value without setting the optional dtype or out arguments is currently unsupported. In PyTorch 1.7, when dtype and out are not set a bool fill value will return a tensor of torch.bool dtype, and an integral fill value will return a tensor of torch.long dtype.

Downscaling the versions, as is suggested to others with this problem does unfortunately not work. Does anyone know how to fix this? Thank you in advance,

Best Rinske