Skip to content

Use 16x16 images for input to generate 16x16 output #665

Open
@osetinsky

Description

@osetinsky

I've been trying to apply the solution mentioned in this issue and related issues it references to use my 16x16 image dataset for training / generation:

#486

I modified my final conv layers of the Generator and Discriminator with these suggested changes, but get the following:

2019-11-18 12:16:48 PSTTraceback (most recent call last):
2019-11-18 12:16:48 PSTFile "main.py", line 231, in <module>
2019-11-18 12:16:48 PSToutput = netD(inputv)
2019-11-18 12:16:48 PSTFile "/usr/local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 224, in __call__
2019-11-18 12:16:48 PSTresult = self.forward(*input, **kwargs)
2019-11-18 12:16:48 PSTFile "main.py", line 179, in forward
2019-11-18 12:16:48 PSToutput = self.main(input)
2019-11-18 12:16:48 PSTFile "/usr/local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 224, in __call__
2019-11-18 12:16:48 PSTresult = self.forward(*input, **kwargs)
2019-11-18 12:16:48 PSTFile "/usr/local/lib/python3.6/site-packages/torch/nn/modules/container.py", line 67, in forward
2019-11-18 12:16:48 PSTinput = module(input)
2019-11-18 12:16:48 PSTFile "/usr/local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 224, in __call__
2019-11-18 12:16:48 PSTresult = self.forward(*input, **kwargs)
2019-11-18 12:16:48 PSTFile "/usr/local/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 254, in forward
2019-11-18 12:16:48 PSTself.padding, self.dilation, self.groups)
2019-11-18 12:16:48 PSTFile "/usr/local/lib/python3.6/site-packages/torch/nn/functional.py", line 52, in conv2d
2019-11-18 12:16:48 PSTreturn f(input, weight, bias)
2019-11-18 12:16:48 PSTRuntimeError: CUDNN_STATUS_BAD_PARAM

OK, so I wasn't expecting the config for 32x32 images to work for my 16x16 dataset, so then tweaked the last conv in my discriminator as follows:

nn.Conv2d(ndf * 8, 1, 2, 2, 0, bias=False)

to

nn.Conv2d(ndf * 8, 1, 1, 2, 0, bias=False)

This runs! But the training generated files are 32x32, not 16x16 as expected. So it seems that something is still off in my generator. How do I ensure that the generator produces 16x16 images?

Any feedback / guidance appreciated! Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions