BiLstm_CNN_CRF_CWS
BiLstm_CNN_CRF_CWS copied to clipboard
AttributeError: 'CRF' object has no attribute '_inbound_nodes
2018-04-17 14:11:48.703574: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
WARNING:tensorflow:From /usr/local/lib/python3.5/site-packages/keras/backend/tensorflow_backend.py:1188: calling reduce_sum (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.
Instructions for updating:
keep_dims is deprecated, use keepdims instead
bilstm_cnn_crf.py:59: UserWarning: Update your Conv1D
call to the Keras 2 API: Conv1D(padding="valid", kernel_size=5, filters=50)
conv=Conv1D(nb_filter=50,filter_length=2*half_window_size+1,padding='valid')(padding_layer)
WARNING:tensorflow:From /usr/local/lib/python3.5/site-packages/tensorflow/python/util/deprecation.py:497: calling conv1d (from tensorflow.python.ops.nn_ops) with data_format=NHWC is deprecated and will be removed in a future version.
Instructions for updating:
NHWC
for data_format is deprecated, use NWC
instead
bilstm_cnn_crf.py:64: UserWarning: The merge
function is deprecated and will be removed after 08/2017. Use instead layers from keras.layers.merge
, e.g. add
, concatenate
, etc.
rnn_cnn_merge=merge([bilstm_d,dense_conv],mode='concat',concat_axis=2)
/usr/local/lib/python3.5/site-packages/keras/legacy/layers.py:458: UserWarning: The Merge
layer is deprecated and will be removed after 08/2017. Use instead layers from keras.layers.merge
, e.g. add
, concatenate
, etc.
name=name)
WARNING:tensorflow:From /usr/local/lib/python3.5/site-packages/keras/backend/tensorflow_backend.py:1171: calling reduce_min (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.
Instructions for updating:
keep_dims is deprecated, use keepdims instead
bilstm_cnn_crf.py:72: UserWarning: Update your Model
call to the Keras 2 API: Model(inputs=[<tf.Tenso..., outputs=[<tf.Tenso...)
model = Model(output=[crf_output], input=[word_input])
Traceback (most recent call last):
File "bilstm_cnn_crf.py", line 458, in
执行python bilstm_cnn_crf.py 的时候,一直报这个错误,不知道该怎么解决
@zhmfan 这是因为keras版本和keras_contrib版本不匹配,可以pip install keras==2.0.6 试试
我也是这样的问题,版本都对啊
@liueagle 试试windows系统下
是后端tensorflow版本和keras版本不匹配的原因,比如keras==2.1.3 tensorflow==1.2.1没有问题,无关系统