github-pengge / PyTorch-progressive_growing_of_gans

PyTorch implementation of Progressive Growing of GANs for Improved Quality, Stability, and Variation.
580 stars 98 forks source link

incompatibilities with python2 #17

Closed d-acharya closed 6 years ago

d-acharya commented 6 years ago

In addition to print statement, there are following inconsistencies with python 2

  1. copy in base_model.py will not work. shape.copy() is not available in python2. Use target_shape=shape[:] or something similar.
  2. imports need __init__.py in python earlier than 3.2. so import models.<> or import utils.<> will not work Alternative is to add sys.path.append('utils') and sys.path.append('models') as already done and then
    
    from data import CelebA, RandomNoiseGenerator
    from model import Generator, Discriminator