jeffheaton / t81_558_deep_learning

T81-558: Keras - Applications of Deep Neural Networks @Washington University in St. Louis
https://sites.wustl.edu/jeffheaton/t81-558/
Other
5.72k stars 3.03k forks source link

Run StyleGAN2 From Python Code #93

Closed perryjamessugden closed 3 years ago

perryjamessugden commented 3 years ago

Hey

I've run into a recent issue of when running the follow line (in colab) I can still run this line, no issues with some older generated .pkl files.

Run StyleGAN2 From Python Code

import IPython.display

URL = "......" tflib.init_tf() print('Loading networks from "%s"...' % URL) with dnnlib.util.open_url(URL) as fp: _G, _D, Gs = pickle.load(fp)

--------------------------------------------------------------
Loading networks from "...."...

Downloading ... done

**UnpicklingError Traceback (most recent call last)

in () 6 print('Loading networks from "%s"...' % URL) 7 with dnnlib.util.open_url(URL) as fp: ----> 8 _G, _D, Gs = pickle.load(fp) UnpicklingError: invalid load key, '\x0a'.**
jeffheaton commented 3 years ago

I will take a look

perryjamessugden commented 3 years ago

Thanks so much

perryjamessugden commented 3 years ago

I was able to resolve, following this https://github.com/xinntao/ESRGAN/issues/67

jeffheaton commented 3 years ago

I think this resolves this too, https://github.com/jeffheaton/t81_558_deep_learning/blob/daab5359c582677afd50a8688326858bb41181e6/t81_558_class_07_3_style_gan.ipynb