您好,我跑了train.py,得到如下报错,谷歌了好多没有解决,希望您有空能回复下我,报错如下:
/home/lijing/Envs/information_ex/bin/python /home/lijing/Desktop/resre/ResCNN_RelationExtraction-master/ResidualCNN9/train.py
Parameters:
ALLOW_SOFT_PLACEMENT=True
BATCH_SIZE=64
CHECKPOINT_EVERY=100
DROPOUT_KEEP_PROB=0.5
EMBEDDING_DIM=50
EVALUATE_EVERY=1000
FILTER_SIZES=3
L2_REG_LAMBDA=0.0
LOG_DEVICE_PLACEMENT=False
NUM_EPOCHS=200
NUM_FILTERS=128
SEQUENCE_LENGTH=100
WordTotal= 114044
Word dimension= 1
RelationTotal: 53
Start loading training data.
Start loading testing data.
570088 96678
2017-10-09 11:13:25.942678: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-10-09 11:13:25.943045: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-10-09 11:13:25.943053: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-10-09 11:13:25.943059: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-10-09 11:13:25.943065: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
Finish randomize data
Start Training
Writing to /home/lijing/Desktop/resre/ResCNN_RelationExtraction-master/ResidualCNN9/runs/1507518810
Initialize variables.
Batch data
Traceback (most recent call last):
File "/home/lijing/Desktop/resre/ResCNN_RelationExtraction-master/ResidualCNN9/train.py", line 152, in
loss = train_step(x_batch, y_batch, p1_batch, p2_batch)
File "/home/lijing/Desktop/resre/ResCNN_RelationExtraction-master/ResidualCNN9/train.py", line 110, in train_step
feed_dict)
File "/home/lijing/Envs/information_ex/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 895, in run
run_metadata_ptr)
File "/home/lijing/Envs/information_ex/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1100, in _run
% (np_val.shape, subfeed_t.name, str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (64, 100, 1) for Tensor 'input_x:0', which has shape '(?, 100, 50)'
Process finished with exit code 1
我的环境如下:
bleach (1.5.0)
html5lib (0.9999999)
jieba (0.39)
Markdown (2.6.9)
network (0.1)
nltk (3.2.5)
numpy (1.13.3)
pip (9.0.1)
protobuf (3.4.0)
pudb (2017.1.1)
Pygments (1.3)
scikit-learn (0.19.0)
setuptools (36.5.0)
six (1.11.0)
tensorflow (1.3.0)
tensorflow-tensorboard (0.1.7)
Werkzeug (0.12.2)
wheel (0.30.0)