@Billy1900 it happens because the notebooks were originally developed using Python 2.7.
So, if you run the notebook with a Python2.7 kernel, it will run flawlessly.
Also it fails on Python 3.7 due to some changes between Python2.7 and Python3.7:
So to fix that problem, you can simply change line:
trainable_variables = weights.values() + biases.values()
by this content:
trainable_variables = list(weights.values()) + list(biases.values())
It solves the problem... Hope that helps.
@Billy1900 it happens because the notebooks were originally developed using Python 2.7.
So, if you run the notebook with a Python2.7 kernel, it will run flawlessly.
Also it fails on Python 3.7 due to some changes between Python2.7 and Python3.7:
- On Python2.7, dictionary.values() returns an object from list class;
- On Python3.7, dictionary.values() returns an object from dict_values class;
So to fix that problem, you can simply change line:
trainable_variables = weights.values() + biases.values()
by this content:
trainable_variables = list(weights.values()) + list(weights.values())
It solves the problem... Hope that helps.
trainable_variables = list(weights.values()) + list(weights.values())
or trainable_variables = list(weights.values()) + list(biass.values())
?
it should be trainable_variables = list(weights.values()) + list(biass.values())
and it works, thanks!
Most helpful comment
@Billy1900 it happens because the notebooks were originally developed using Python 2.7.
So, if you run the notebook with a Python2.7 kernel, it will run flawlessly.
Also it fails on Python 3.7 due to some changes between Python2.7 and Python3.7:
So to fix that problem, you can simply change line:
trainable_variables = weights.values() + biases.values()
by this content:
trainable_variables = list(weights.values()) + list(biases.values())
It solves the problem... Hope that helps.