ARCHIVED: Contains historical course materials/Homework materials for the FREE MOOC course on "Creative Applications of Deep Learning w/ Tensorflow" #CADL
I get a type error when trying to generate image from random noise in the ipython notebook. Numpy seems to have a problem with upcasting the datatypes.
TypeError Traceback (most recent call last)
<ipython-input-48-b06014ec4265> in <module>()
1 # Create some noise, centered at gray
2 img_noise = inception.preprocess(
----> 3 (np.random.randint(100, 150, size=(224, 224, 3))))[np.newaxis]
4 print(img_noise.min(), img_noise.max())
/home/clu/Python/CADL-master/session-4/libs/inception.py in preprocess(img, crop, resize, dsize)
81 def preprocess(img, crop=True, resize=True, dsize=(299, 299)):
82 if img.dtype != np.uint8:
---> 83 img *= 255
84
85 if crop:
I get a type error when trying to generate image from random noise in the ipython notebook. Numpy seems to have a problem with upcasting the datatypes.
`