I want to understand why this particular tensor flow warning is coming up...?

Viewed 1476

I think so that this could be affected both due to some intricacies in tensorflow-gpu package and tensorflow package package that's why I am getting this...

I am just trying to train a normal softmax classifier with two hidden layers and inputting the required tensor in tf.float32 format but I am getting this error...

WARNING: Entity <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x000002F4EC7C8AC8>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x000002F4EC7C8AC8>>: AttributeError: module 'gast' has no attribute 'Index'
WARNING: Entity <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x000002F4ECE5AE48>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x000002F4ECE5AE48>>: AttributeError: module 'gast' has no attribute 'Index'
WARNING: Entity <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x000002F4ECE5AE48>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x000002F4ECE5AE48>>: AttributeError: module 'gast' has no attribute 'Index'

I don't understand what does this mean and even I have also tried to ignore warnings but still I am getting this and all I want to understand is how is this warning coming up..?

The code snippet is as follows:

import tensorflow as tf
n_features = X_train_centered.shape[1]
n_classes = 10
random_seed = 123
np.random.seed(random_seed)

g = tf.Graph()
with g.as_default():
    tf.set_random_seed(random_seed)
    tf_x = tf.placeholder(dtype = tf.float32,shape = (None,n_features),name = 'tf_x')
    tf_y = tf.placeholder(dtype = tf.int32,shape = None,name = 'tf_y')
    y_onehot = tf.one_hot(indices = tf_y,depth = n_classes)
    h1 = tf.layers.dense(inputs = tf_x,units = 50,activation = tf.tanh,name = 'layer1')
    h2 = tf.layers.dense(inputs = h1,units = 50,activation = tf.tanh,name = 'layer2')
    logits = tf.layers.dense(inputs = h2,units = 10,activation = None,name = 'layer3')
    predictions = {'classes': tf.argmax(logits,axis = 1,name = 'predicted_classes'),'probabilities' : tf.nn.softmax(logits,name = 'softmax_tensor')}
  • I also tried downgrading gast to a different version, but that still doesn't work
  • Here, X_centered is just the inputted data...
  • I commented and checked that the warning start to occur when I uncomment the first tf.layer.dense allocation to h1...
1 Answers
Related