tgan icon indicating copy to clipboard operation
tgan copied to clipboard

chainer issues

Open benlten opened this issue 6 years ago • 3 comments

Here's just a small snippet of the error chain: File "/home/bcichy/anaconda3/lib/python3.6/site-packages/chainer/dataset/dataset_mixin.py", line 67, in getitem return self.get_example(index) File "datasets/ucf_dataset.py", line 37, in get_example x = self._crop_center(x) File "datasets/ucf_dataset.py", line 26, in _crop_center assert x.shape[2] == self.img_size AssertionError

Is there a specific chainer version to run (+ cupy) because I don't see a requirements file for this project.

benlten avatar Aug 13 '18 20:08 benlten

"Chainer 2.0.0+" I`m using Chainer 4.3.1 and Cupy 4.1.0

heitorrapela avatar Aug 22 '18 17:08 heitorrapela

I am still getting the assertion error for the method that crops the center:

I see the check for image_size (64) for the uc_dataset.py - but I am assuming the hd5 data is being used, unless this is a sanity check.

File "/data/bcichy/tgan/train.py", line 188, in sys.exit(main()) File "/data/bcichy/tgan/train.py", line 183, in main trainer.run() File "/data/bcichy/anaconda3/envs/tgan/lib/python3.6/site-packages/chainer/training/trainer.py", line 320, in run six.reraise(*sys.exc_info()) File "/data/bcichy/anaconda3/envs/tgan/lib/python3.6/site-packages/six.py", line 693, in reraise raise value File "/data/bcichy/anaconda3/envs/tgan/lib/python3.6/site-packages/chainer/training/trainer.py", line 306, in run update() File "/data/bcichy/anaconda3/envs/tgan/lib/python3.6/site-packages/chainer/training/updaters/standard_updater.py", line 149, in update self.update_core() File "updaters/tgan_updater_wgan.py", line 30, in update_core real_video, fake_video, dis_fake, dis_real = self.forward() File "updaters/tgan_updater_base.py", line 57, in forward real_video = self._get_real_video() File "updaters/tgan_updater_base.py", line 17, in _get_real_video batch = self.get_iterator('main').next() File "/data/bcichy/anaconda3/envs/tgan/lib/python3.6/site-packages/chainer/iterators/multiprocess_iterator.py", line 86, in next batch, prefetch_state = self._prefetch_loop.measure() File "/data/bcichy/anaconda3/envs/tgan/lib/python3.6/site-packages/chainer/iterators/multiprocess_iterator.py", line 304, in measure batch = [self.dataset[idx] for idx in indices] File "/data/bcichy/anaconda3/envs/tgan/lib/python3.6/site-packages/chainer/iterators/multiprocess_iterator.py", line 304, in batch = [self.dataset[idx] for idx in indices] File "/data/bcichy/anaconda3/envs/tgan/lib/python3.6/site-packages/chainer/dataset/dataset_mixin.py", line 67, in getitem return self.get_example(index) File "datasets/ucf_dataset.py", line 37, in get_example x = self._crop_center(x) File "datasets/ucf_dataset.py", line 26, in _crop_center assert x.shape[2] == self.img_size AssertionError

benlten avatar Sep 27 '18 19:09 benlten

This is not a chainer issue. This is because the provided pre-processed dataset has the videos cropped to 48 x 48 for some reason. This can be solved by manually pre-processing the videos.

MannyKayy avatar Nov 11 '18 18:11 MannyKayy