GithubHelp home page GithubHelp logo

Comments (1)

abujbr avatar abujbr commented on August 18, 2024

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 3276800

I 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.