tflearn / tflearn

Deep learning library featuring a higher-level API for TensorFlow.
http://tflearn.org
Other
9.62k stars 2.41k forks source link

At least two variables have the same name: FullyConnected/W #1020

Open Kishwar opened 6 years ago

Kishwar commented 6 years ago

I am trying to run tflearn.DNN(net) on net below. I am getting error "At least two variables have the same name: FullyConnected/W".

Network building

net = tflearn.input_data([None, width, height]) net = tflearn.lstm(net, 128, dropout=0.8) net = tflearn.fully_connected(net, classes, activation='softmax') net = tflearn.regression(net, optimizer='adam', learning_rate=learning_rate, loss='categorical_crossentropy')

DhanushDK17 commented 6 years ago

Did you find any solution? I've the same problem....

Kishwar commented 6 years ago

Yes. Change tf version to 1.2 and python 2.7.

DhanushDK17 commented 6 years ago

Thanks.

vsauvage-ciis commented 6 years ago

Yes. Change tf version to 1.2 and python 2.7.

Aren't these old version of python and TensorFlow? I have the same issue running tf 1.5.0 and python 3.6

zhvankh commented 5 years ago

You can try to delete this part:

add this "fix" for tensorflow version errors

col = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES) for x in col: tf.add_to_collection(tf.GraphKeys.VARIABLES, x )

It works fine for me

ZahinAbrar commented 5 years ago

I faced a similar problem, one solution which seemed really cool and easy is to restarting the Kernel.