Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running CoGAN #5

Open
mmosquera10 opened this issue Feb 21, 2018 · 4 comments
Open

Running CoGAN #5

mmosquera10 opened this issue Feb 21, 2018 · 4 comments

Comments

@mmosquera10
Copy link

Hello,

I am trying to run the code. Can you please tell me how to run this and specify any dependencies? There was no README file included with the code.

Thank You,
Maria

@mingyuliutw
Copy link
Owner

@mmosquera10
Copy link
Author

Sorry about that. For some reason I did not see it.
I have an issue running the code for Pytorch. I am trying to run the simple example:
cd cogan_pytorch/src;
python train_cogan_mnistedge.py --config ../exps/mnistedge_cogan.yaml;

However, I get the following output and error:
python train_cogan_mnistedge.py --config ../exps/mnistedge_cogan.yaml
self.scale=2.0
self.log='../outputs/mnistedge_cogan/mnistedge_cogan.log'
self.snapshot_prefix='../outputs/mnistedge_cogan/mnistedge_cogan'
self.max_iter=5000
self.batch_size=64
self.bias=0.5
self.latent_dims=100
self.snapshot_iter=500
self.display=10
<net_config.NetConfig object at 0x7fd9cd2def90>
Traceback (most recent call last):
File "train_cogan_mnistedge.py", line 95, in
main(sys.argv)
File "train_cogan_mnistedge.py", line 35, in main
os.remove(config.log)
OSError: [Errno 21] Is a directory: '../outputs/mnistedge_cogan/mnistedge_cogan.log'

Any help would be greatly appreciated! Thanks!

@ybZhao1119
Copy link

i have the same question with the above ,can you tell me how to solve the problem?

Any help would be greatly appreciated!Thanks!

@sandhyalaxmiK
Copy link

if the directory is empty, you have to use, os.remove().
If the directory contains files, then, use
import shutil
shutil.rmtree(config.log)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants