openai / improved-gan

Code for the paper "Improved Techniques for Training GANs"
https://arxiv.org/abs/1606.03498
2.3k stars 623 forks source link

Tab Error #35

Open marcinic opened 6 years ago

marcinic commented 6 years ago

In [1]: from model import DCGAN Traceback (most recent call last):

File "/home/marcinic/miniconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2910, in run_code exec(code_obj, self.user_global_ns, self.user_ns)

File "", line 1, in from model import DCGAN

File "/home/marcinic/hdd/projects/reinforcement/retro/improved-gan/imagenet/model.py", line 47 self.out_init_b = out_init_b ^ TabError: inconsistent use of tabs and spaces in indentation

A couple lines in imagenet/model.py use tabs instead of spaces

mtoseef99 commented 5 years ago

@marcinic did you solve this error? If yes then how?

evhub commented 5 years ago

@Toseef99 From the looks of it, this repo was written in Python 2, not Python 3; you will fix this and many other errors trying to run this repository if you switch to Python 2. (For the curious, Python 2 allows mixed tabs and spaces (treating a tab as 8 spaces), whereas Python 3 simply disallows mixing tabs and spaces.)

mtoseef99 commented 5 years ago

@evhub could you please tell me a specific version of Python 2?