Comments (1)
Hello, I followed the instructions for uploading a custom dataset. However, I get this error:
$ python main.py --dataset ships --gan_type GAN --epoch 50 --batch_size 64
---------- Networks architecture -------------
generator(
(fc): Sequential(
(0): Linear(in_features=62, out_features=1024, bias=True)
(1): BatchNorm1d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
(2): ReLU()
(3): Linear(in_features=1024, out_features=6272, bias=True)
(4): BatchNorm1d(6272, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
(5): ReLU()
)
(deconv): Sequential(
(0): ConvTranspose2d(128, 64, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1))
(1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
(2): ReLU()
(3): ConvTranspose2d(64, 3, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1))
(4): Tanh()
)
)
Total number of parameters: 6642243
discriminator(
(conv): Sequential(
(0): Conv2d(3, 64, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1))
(1): LeakyReLU(negative_slope=0.2)
(2): Conv2d(64, 128, kernel_size=(4, 4), stride=(2, 2), padding=(1, 1))
(3): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
(4): LeakyReLU(negative_slope=0.2)
)
(fc): Sequential(
(0): Linear(in_features=6272, out_features=1024, bias=True)
(1): BatchNorm1d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
(2): LeakyReLU(negative_slope=0.2)
(3): Linear(in_features=1024, out_features=1, bias=True)
(4): Sigmoid()
)
)
Total number of parameters: 6561217
training start!! Traceback (most recent call last): File "main.py", line 111, in main() File "main.py", line 103, in main gan.train() File "C:\Users\evdelph\Desktop\NEEC\test\pytorch-generative-model-collections\GAN.py", line 144, in train D_real = self.D(x_) File "C:\Users\evdelph\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\nn\modules\module.py", line 532, in call result = self.forward(*input, **kwargs) File "C:\Users\evdelph\Desktop\NEEC\test\pytorch-generative-model-collections\GAN.py", line 67, in forward x = x.view(-1, 128 * (self.input_size // 4) * (self.input_size // 4)) RuntimeError: shape '[-1, 6272]' is invalid for input of size 3276800I am not sure how to fix this error. I am trying to generate images of ships for a school project.
Any insight would be great. Thanks!
I got exactly the same error message!
did you managed to solve it ?
from pytorch-generative-model-collections.
Related Issues (20)
- Doubt in ACGAN HOT 3
- Questions about training ACGAN HOT 1
- How can I use the celebA dataset? HOT 1
- question about wgan-gp
- bug for infoGAN when change data to celebA
- How to use my own dataset HOT 8
- Can you create an implementation of a BiGAN/AliGAN?
- How to run custom dataset with CGAN? HOT 1
- An error occurs. HOT 1
- ACGAN for CIFAR10 Performance
- I managed to fix this issue by placing them in another folder called 1, so my directory is now, data/strawberriesBlack/1/B(1).jpg HOT 1
- No mode collapse in ACGAN (pytorch)
- Supported extensions are: .jpg,.jpeg,.png,.ppm,.bmp,.pgm,.tif,.tiff,.webp HOT 1
- How to trian with multiple gpu?
- can you add hinge loss
- [bug report] wrong implementation of gradient clip in WGAN? HOT 1
- RuntimeError: output with shape [1, 28, 28] doesn't match the broadcast shape [3, 28, 28] HOT 1
- RuntimeError: output with shape [1, 28, 28] doesn't match the broadcast shape [3, 28, 28] HOT 2
- InfoGAN can not run because of the pytorch version problem HOT 1
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 pytorch-generative-model-collections.