Comments (13)
Would it be possible to share with me more details? Are you using the latest code? What are your PyTorch and python version? I ran the following code and haven't been able to reproduce this error.
bash ./datasets/download_testset.sh edges2shoes
bash ./pretrained_models/download_model.sh edges2shoes
bash ./scripts/test_edges2shoes.sh
bash ./scripts/train_edges2shoes.sh
from bicyclegan.
i'm using python 3.7 and pytorch 1.0.0, i have same error with him
from bicyclegan.
Did you run the following commands?
bash ./datasets/download_testset.sh edges2shoes
bash ./pretrained_models/download_model.sh edges2shoes
bash ./scripts/test_edges2shoes.sh
bash ./scripts/train_edges2shoes.sh
from bicyclegan.
Yes I've tried it in pix2pix repo docker. but i have same problem.
from bicyclegan.
This is full error message
Loading model bicycle_gan
Traceback (most recent call last):
File "./test.py", line 32, in <module>
for i, data in enumerate(islice(dataset, opt.num_test)):
File "/root/gans/BicycleGAN/data/__init__.py", line 90, in __iter__
for i, data in enumerate(self.dataloader):
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 637, in __next__
return self._process_next_batch(batch)
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 658, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
RuntimeError: Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 138, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 138, in <listcomp>
samples = collate_fn([dataset[i] for i in batch_indices])
File "/root/gans/BicycleGAN/data/aligned_dataset.py", line 53, in __getitem__
A = A_transform(A)
File "/usr/local/lib/python3.5/dist-packages/torchvision/transforms/transforms.py", line 60, in __call__
img = t(img)
File "/usr/local/lib/python3.5/dist-packages/torchvision/transforms/transforms.py", line 163, in __call__
return F.normalize(tensor, self.mean, self.std, self.inplace)
File "/usr/local/lib/python3.5/dist-packages/torchvision/transforms/functional.py", line 208, in normalize
tensor.sub_(mean[:, None, None]).div_(std[:, None, None])
RuntimeError: output with shape [1, 256, 256] doesn't match the broadcast shape [3, 256, 256]
from bicyclegan.
你运行以下命令了吗?
bash ./datasets/download_testset.sh edges2shoes bash ./pretrained_models/download_model.sh edges2shoes bash ./scripts/test_edges2shoes.sh bash ./scripts/train_edges2shoes.sh
Hello! I am so thanks for your replay.
I known you run this program in linux.
But i run it in windows and use following prams from your sh scripts:
--display_id
1
--dataroot
D:\dataset\edges2shoes\edges2shoes
--name
edges2shoes_bicycle_gan
--model
bicycle_gan
--direction
AtoB
--checkpoints_dir
../checkpoints/edges2shoes/
--load_size
256
--crop_size
256
--nz
8
--input_nc
1
--niter
30
--niter_decay
30
--use_dropout
you know this is the same as you scripts:
set -ex
# models
RESULTS_DIR='./results/edges2shoes'
G_PATH='./pretrained_models/edges2shoes_net_G.pth'
E_PATH='./pretrained_models/edges2shoes_net_E.pth'
# dataset
CLASS='edges2shoes'
DIRECTION='AtoB' # from domain A to domain B
LOAD_SIZE=256 # scale images to this size
CROP_SIZE=256 # then crop to this size
INPUT_NC=1 # number of channels in the input image
# misc
GPU_ID=0 # gpu id
NUM_TEST=10 # number of input images duirng test
NUM_SAMPLES=10 # number of samples per input images
# command
CUDA_VISIBLE_DEVICES=${GPU_ID} python ./test.py \
--dataroot ./datasets/${CLASS} \
--results_dir ${RESULTS_DIR} \
--checkpoints_dir ./pretrained_models/ \
--name ${CLASS} \
--direction ${DIRECTION} \
--load_size ${LOAD_SIZE} \
--crop_size ${CROP_SIZE} \
--input_nc ${INPUT_NC} \
--num_test ${NUM_TEST} \
--n_samples ${NUM_SAMPLES} \
--center_crop \
--no_flip
from bicyclegan.
Pytorch 0.4 and torchvision 0.2.1 work well for testing.
from bicyclegan.
@shazhongcheng We don't have a Windows machine. Not sure if it is related to Windows or not.
We are still looking at this issue. It's difficult for me to reproduce with my environment. Will get back to your folks if we have a better understanding.
from bicyclegan.
from bicyclegan.
From this post, it seems to be related to the version of torchvision. Could you try to upgrade your torchvision to torchvision 0.2.1
?
from bicyclegan.
Hi folks, could you try the latest commit? Hopefully, it can address your issues.
from bicyclegan.
torch 1.0.1
torchfile 0.1.0
torchfusion 0.3.3
torchtext 0.3.1
torchvision 0.2.2.post3
tornado 5.1.1
this is my version
and i will try latest commit . thank you for your work.
from bicyclegan.
@junyanz Yes now its working great!! Thank you.
from bicyclegan.
Related Issues (20)
- Why does not large batch size like 128, 256 work well?
- Hi, please help me.
- Very Large Images
- Why my LPIPS distance is larger than what your paper say? HOT 3
- Question about conditional_D implementation HOT 3
- Not clear in the difference between the two latent spaces predicted HOT 5
- Test on single images HOT 1
- Compute graph wrong and one question HOT 4
- test_before_push is a great rapid test file, but seems outdated? HOT 3
- Metric reporting HOT 1
- Question about Encoder in cLR-GAN HOT 1
- Question about generating fake_B_random
- Question: Do you need two separate discriminators? HOT 2
- Incorrect discriminator update for opt.use_same_D HOT 1
- Regarding Training your Own Images HOT 4
- How to train on large images?
- Is there <pix2pix+noise> model code that can be directly run? HOT 1
- diversity question
- TypeError: __init__() got an unexpected keyword argument 'nl_layer'
- Regarding Latent Space Interpolation
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 bicyclegan.