subpic/ava-mlsp

Google colab example notebook fails

Closed this issue · 1 comments

Running the example notebook for prediction, the second block fails with the following output:

TensorFlow 1.x selected.

Using TensorFlow backend.
WARNING: Logging before flag parsing goes to stderr.
W0419 19:42:05.809283 139691939321728 module_wrapper.py:139] From /tensorflow-1.15.2/python2.7/tensorflow_estimator/python/estimator/api/_v1/estimator/__init__.py:12: The name tf.estimator.inputs is deprecated. Please use tf.compat.v1.estimator.inputs instead.


AttributeErrorTraceback (most recent call last)

<ipython-input-2-e67854dd47dc> in <module>()
      1 get_ipython().magic(u'tensorflow_version 1.x')
----> 2 import kutils
      3 from kutils import model_helper as mh
      4 from kutils import applications as apps
      5 from kutils import tensor_ops as ops

1 frames

/content/kutils/__init__.py in <module>()
----> 1 import generic, tensor_ops, image_utils
      2 import generators, model_helper, applications
      3 
      4 from keras import backend as K
      5 if K.backend()=='tensorflow':

/content/kutils/tensor_ops.py in <module>()
      2 from keras.engine.topology import Layer
      3 import os
----> 4 tf = K.tf
      5 
      6 # Keras configuration directives

AttributeError: 'module' object has no attribute 'tf'

I've updated the colab example to use the newer kutils library (ku). Please use a Python 3 GPU instance.