Comments (3)
I had train the pix2pix model in your code. Then I want to test the model, and run: python test.py --dataroot ./datasets/test_photo2pants_pix2pix --model pix2pix --name photos2pants_ccp_pix2pix --loadSizeH 240 --loadSizeW 160 --fineSizeH 240 --fineSizeW 160
But it didn't work since it raised the AttributeError again.
dataset [AlignedDataset] was created
initialize network with normal
model [Pix2PixModel] was created
loading the model from ./checkpoints\photos2pants_ccp_pix2pix\latest_net_G.pth
---------- Networks initialized -------------
[Network G] Total number of parameters : 11.383 M
Traceback (most recent call last):
File "test.py", line 29, in
for i, data in enumerate(dataset):
File "D:\MINE\STUDY in SYSU\SmartLLV\Papers\instagan-master\data_init_.py", line 72, in iter
for i, data in enumerate(self.dataloader):
File "D:\devcool\Anaconda2\envs\python36\lib\site-packages\torch\utils\data\dataloader.py", line 286, in next
return self._process_next_batch(batch)
File "D:\devcool\Anaconda2\envs\python36\lib\site-packages\torch\utils\data\dataloader.py", line 307, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
AttributeError: Traceback (most recent call last):
File "D:\devcool\Anaconda2\envs\python36\lib\site-packages\torch\utils\data\dataloader.py", line 57, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "D:\devcool\Anaconda2\envs\python36\lib\site-packages\torch\utils\data\dataloader.py", line 57, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "D:\MINE\STUDY in SYSU\SmartLLV\Papers\instagan-master\data\aligned_dataset.py", line 26, in getitem
assert(self.opt.loadSize >= self.opt.fineSize)
AttributeError: 'Namespace' object has no attribute 'fineSize'
from instagan.
Since you did't use fineSize and loadSize, I put the photos in the foIder testA and new another empty folder testB, and I choose the option --dataset_mode unaligned,and run:python test.py --dataroot ./datasets/test_photo2pants_pix2pix --model pix2pix --name photos2pants_ccp_pix2pix --loadSizeH 240 --loadSizeW 160 --fineSizeH 240 --fineSizeW 160 --dataset_mode unaligned.
Then here raised another error. It seems the testB can't be empty. However, If I want to test the pix2pix model there is nothing I can put in the testB folder.
dataset [UnalignedDataset] was created
initialize network with normal
model [Pix2PixModel] was created
loading the model from ./checkpoints\photos2pants_ccp_pix2pix\latest_net_G.pth
---------- Networks initialized -------------
[Network G] Total number of parameters : 11.383 M
Traceback (most recent call last):
File "test.py", line 29, in
for i, data in enumerate(dataset):
File "D:\MINE\STUDY in SYSU\SmartLLV\Papers\instagan-master\data_init_.py", line 72, in iter
for i, data in enumerate(self.dataloader):
File "D:\devcool\Anaconda2\envs\python36\lib\site-packages\torch\utils\data\dataloader.py", line 286, in next
return self._process_next_batch(batch)
File "D:\devcool\Anaconda2\envs\python36\lib\site-packages\torch\utils\data\dataloader.py", line 307, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
ZeroDivisionError: Traceback (most recent call last):
File "D:\devcool\Anaconda2\envs\python36\lib\site-packages\torch\utils\data\dataloader.py", line 57, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "D:\devcool\Anaconda2\envs\python36\lib\site-packages\torch\utils\data\dataloader.py", line 57, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "D:\MINE\STUDY in SYSU\SmartLLV\Papers\instagan-master\data\unaligned_dataset.py", line 31, in getitem
index_B = index % self.B_size
ZeroDivisionError: integer division or modulo by zero
from instagan.
Yes both testA and testB should not be empty. Since I wanted to change the code minimally, I simply put garbage data in testB and run the model.
from instagan.
Related Issues (20)
- hi, I did an experiments on hair style transfer, but it seem don't work. HOT 11
- dataloader is broken HOT 1
- IndexError: list index out of range HOT 1
- broadcasting error (output) HOT 1
- Two inputs' ranges in models/insta_gan_model.py 230 row
- where can I download the pre-train model? HOT 2
- AttributeError: InstaGANModel instance has no attribute 'fake_B_img_sng'
- From my training logs, the TEACHER is always 0. Is that normal?
- trouble in datsets create
- Different Amount of Maks in training and test time HOT 1
- RuntimeError: output with shape [1, 240, 160] doesn't match the broadcast shape [3, 240, 160] HOT 1
- The design of adding mask to CycleGAN HOT 1
- RuntimeError: output with shape [1, 300, 200] doesn't match the broadcast shape [3, 300, 200] HOT 2
- Can InstaGAN be used for minor attribute manipulation? HOT 1
- While testing also the bnary masks are needed for bothe the domains?
- What happened to the (pear2orange) generated image without deformation
- Convert only one
- my own groundtruth images
- Calculation of masked classification score
- RuntimeError: cublas runtime error during training
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 instagan.