Comments (8)
Hey @CQNing
Which pytorch-lighting version are you using?
from im2vec.
Hey @CQNing
Which pytorch-lighting version are you using?
Here are what I use now:
pytorch-lightning 1.4.2
torch 1.8.0
python 3.7.10
from im2vec.
could try training with pytorch-lightning version 0.9.0
from im2vec.
could try training with pytorch-lightning version 0.9.0
I tried this command: conda install pytorch-lightning=0.9.0 -c conda-forge
but the pytorch-lightning version changed into 0.8.5
and command:CUDA_VISIBLE_DEVICES=1 python run.py -c configs/emoji.yaml
Traceback (most recent call last):
File "run.py", line 117, in
runner.fit(experiment)
File ".../lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 1044, in fit
results = self.run_pretrain_routine(model)
File ".../lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 1185, in run_pretrain_routine
self.reset_val_dataloader(ref_model)
File ".../lib/python3.7/site-packages/pytorch_lightning/trainer/data_loading.py", line 343, in reset_val_dataloader
self.num_val_batches, self.val_dataloaders = self._reset_eval_dataloader(model, 'val')
File ".../lib/python3.7/site-packages/pytorch_lightning/trainer/data_loading.py", line 303, in _reset_eval_dataloader
num_batches = len(dataloader) if _has_len(dataloader) else float('inf')
File ".../lib/python3.7/site-packages/pytorch_lightning/trainer/data_loading.py", line 58, in _has_len
raise ValueError('Dataloader
returned 0 length.'
ValueError:Dataloader
returned 0 length. Please make sure that your Dataloader at least returns 1 batch
from im2vec.
I tried this: pip install pytorch-lightning==0.9.0
and the pytorch-lightning version changed into 0.9.0
but it still came out those problems:
Traceback (most recent call last):
File "run.py", line 117, in
runner.fit(experiment)
File ".../lib/python3.7/site-packages/pytorch_lightning/trainer/states.py", line 48, in wrapped_fn
result = fn(self, *args, **kwargs)
File ".../lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 1084, in fit
results = self.accelerator_backend.train(model)
File ".../lib/python3.7/site-packages/pytorch_lightning/accelerators/cpu_backend.py", line 39, in train
results = self.trainer.run_pretrain_routine(model)
File ".../lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 1224, in run_pretrain_routine
self._run_sanity_check(ref_model, model)
File ".../lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 1249, in _run_sanity_check
self.reset_val_dataloader(ref_model)
File ".../lib/python3.7/site-packages/pytorch_lightning/trainer/data_loading.py", line 337, in reset_val_dataloader
self.num_val_batches, self.val_dataloaders = self._reset_eval_dataloader(model, 'val')
File ".../lib/python3.7/site-packages/pytorch_lightning/trainer/data_loading.py", line 299, in _reset_eval_dataloader
num_batches = len(dataloader) if _has_len(dataloader) else float('inf')
File ".../lib/python3.7/site-packages/pytorch_lightning/trainer/data_loading.py", line 70, in _has_len
raise ValueError('Dataloader
returned 0 length.'
ValueError:Dataloader
returned 0 length. Please make sure that your Dataloader at least returns 1 batch
from im2vec.
Hey @CQNing
Sorry for the late reply completely slipped my mind.
Could you try
os.path.exists(self.params['data_path'])
here https://github.com/preddy5/Im2Vec/blob/master/experiment.py#L320 that should tell us if the folder is present or not.
If the output is true then torchvision datasets seems to have a bug and you can use the MyDataset object present in the experiment file.
from im2vec.
Hi, @preddy5
I‘ve solved this problem. And I feel so shame that this occurs because my carelessness.
self.sample_dataloader = DataLoader(dataset,
batch_size= 64, ###############
shuffle = False,
drop_last=True)
When I tried to train my dataset at first, I reduced the batch_size in emoji.yaml. And I didn't change the batch_size in DataLoader(). Emmm.... Sorry to bother you!
from im2vec.
I am glad you figured it out.
from im2vec.
Related Issues (20)
- the loss is NAN when train model HOT 7
- training on real images?
- Default config (emoji.yaml) fails to converge HOT 7
- Why are there many copies in the dataset? HOT 2
- Post-decoding process HOT 3
- emoji dataset is settled to 4 parts, and every parts is filled with a constant color, does this mean im2vec can only deal with HOT 5
- Segmentation tool HOT 4
- Speeding up training and using attention HOT 1
- Chamfer distance code
- Can't install dependencies HOT 1
- Training example from README wont work
- Dependency Conflict with Pillow
- MisconfigurationException in Training Example
- pip install -r requirements.txt. ERRORS HOT 1
- About training details HOT 6
- RuntimeError: stack expects a non-empty TensorList HOT 3
- The difference between VectorVAE and VectorVAEnLayers
- No module named 'pydiffvg' HOT 1
- How to train with celeba dataset? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from im2vec.