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

Update pytorch version in USAGE.md #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

qwzybug
Copy link

@qwzybug qwzybug commented May 29, 2018

Running the examples with pytorch 0.3 causes an error:

(img2img) paperspace@psgg6az8h:~/img2img/MUNIT$ python test.py --config configs/edges2handbags_folder.yaml --input inputs/edge.jpg --output_folder outputs --checkpoint models/edges2handbags.pt --a2b 1
Traceback (most recent call last):
  File "test.py", line 48, in <module>
    trainer = MUNIT_Trainer(config)
  File "/home/paperspace/img2img/MUNIT/trainer.py", line 17, in __init__
    self.gen_a = AdaINGen(hyperparameters['input_dim_a'], hyperparameters['gen'])  # auto-encoder for domain a
  File "/home/paperspace/img2img/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 "/home/paperspace/img2img/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 "/home/paperspace/img2img/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'

track_running_stats isn't defined until pytorch > 0.3.1.
pytorch:nn.modules.instancenorm@0.3.1
pytorch:nn.modules.instancenorm@0.4.0

Running the examples with pytorch 0.3 causes an error:

```
(img2img) paperspace@psgg6az8h:~/img2img/MUNIT$ python test.py --config configs/edges2handbags_folder.yaml --input inputs/edge.jpg --output_folder outputs --checkpoint models/edges2handbags.pt --a2b 1
Traceback (most recent call last):
  File "test.py", line 48, in <module>
    trainer = MUNIT_Trainer(config)
  File "/home/paperspace/img2img/MUNIT/trainer.py", line 17, in __init__
    self.gen_a = AdaINGen(hyperparameters['input_dim_a'], hyperparameters['gen'])  # auto-encoder for domain a
  File "/home/paperspace/img2img/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 "/home/paperspace/img2img/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 "/home/paperspace/img2img/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'
```

`track_running_stats` isn't defined until pytorch > 0.3.1.
[pytorch:nn.modules.instancenorm@0.3.1](https://github.com/pytorch/pytorch/blob/v0.3.1/torch/nn/modules/instancenorm.py)
[pytorch:nn.modules.instancenorm@0.4.0](https://github.com/pytorch/pytorch/blob/v0.4.0/torch/nn/modules/instancenorm.py)
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

Successfully merging this pull request may close these issues.

1 participant