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

TypeError: __init__() got an unexpected keyword argument 'track_running_stats' #24

Closed
xiaoiker opened this issue Jun 16, 2018 · 2 comments

Comments

@xiaoiker
Copy link

While I am running the test code:
python3 test.py --config configs/edges2shoes_folder.yaml --input inputs/edge.jpg --output_folder outputs --checkpoint models/edges2shoes.pt --a2b 1 --style inputs/shoe.jpg

I get the following error info:

Traceback (most recent call last):
File "test.py", line 48, in
trainer = MUNIT_Trainer(config)
File "/wrk/pengwei1/DONOTREMOVE/codes/MUNIT/trainer.py", line 17, in init
self.gen_a = AdaINGen(hyperparameters['input_dim_a'], hyperparameters['gen']) # auto-encoder for domain a
File "/wrk/pengwei1/DONOTREMOVE/codes/MUNIT/networks.py", line 105, in init
self.enc_content = ContentEncoder(n_downsample, n_res, input_dim, dim, 'in', activ, pad_type=pad_type)
File "/wrk/pengwei1/DONOTREMOVE/codes/MUNIT/networks.py", line 210, in init
self.model += [Conv2dBlock(input_dim, dim, 7, 1, 3, norm=norm, activation=activ, pad_type=pad_type)]
File "/wrk/pengwei1/DONOTREMOVE/codes/MUNIT/networks.py", line 308, in init
self.norm = nn.InstanceNorm2d(norm_dim, track_running_stats=True)
TypeError: init() got an unexpected keyword argument 'track_running_stats'
srun: error: g114: task 0: Exited with exit code 1
srun: Terminating job step 22792784.0

My pytorch version is: 0.3.1 CUDA8.0 installed by pip3.

@XiaoningLiu123
Copy link

This is because the PyTorch 0.3 is incompatible with PyTorch 0.4. You should update PyTorch 0.3->PyTorch 0.4

@shamidreza
Copy link

Had the same issue. Upgrading to PyTorch 0.4 solved it for me.

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