TensorFlow-in-a-Nutshell icon indicating copy to clipboard operation
TensorFlow-in-a-Nutshell copied to clipboard

TypeError: __init__() got an unexpected keyword argument 'shape'

Open ryanguest opened this issue 7 years ago • 4 comments

When running the example I get:

TypeError: __init__() got an unexpected keyword argument 'shape'

Easily fixed by changing:

dense_shape=[df[k].size, 1])

to

shape=[df[k].size, 1])

ryanguest avatar Apr 25 '17 16:04 ryanguest

nice, what version of python and version of TF are you using?

camrongodbout avatar Apr 25 '17 20:04 camrongodbout

$ python -c "import sys; print(sys.version)"

2.7.6 (default, Oct 26 2016, 20:30:19) 
[GCC 4.8.4]

$ python -c 'import tensorflow as tf; print(tf.__version__)'

1.0.1

ryanguest avatar Apr 26 '17 00:04 ryanguest

WARNING:tensorflow:From wide.py:64: calling init (from tensorflow.contrib.learn.python.learn.estimators.dnn_linear_combined) with fix_global_step_increment_bug=False is deprecated and will be removed after 2017-04-15.

Raycon983 avatar Mar 18 '18 22:03 Raycon983

But in Python3.6, you should use dense_shape but not shape.

banshee1 avatar Jun 11 '18 18:06 banshee1