pavelgonchar / colornet

Neural Network to colorize grayscale images
3.56k stars 324 forks source link

Changed if conditions on tf.Tensor objects. #4

Closed syniuhin closed 6 years ago

syniuhin commented 8 years ago

Those conditions caused error:

TypeError: Using a `tf.Tensor` as a Python `bool` is not allowed. Use `if t is not None:` instead of `if t:` to test if a tensor is defined, and use the logical TensorFlow ops to test the value of a tensor.

On my OS X El Capitan, Python 2.7.11, Anaconda 4.0.0 and Tensorflow 0.8.0. With those fixes I was able to run a model.