Closed YnnuSL closed 2 years ago
Windows 10 无GPU, python==3.6 tensorflow==1.13 Keras==2.2.4 h5py==2.9.0 UCTB==0.3.0 运行文件:UCTB/Experiments/ST_MGCN/bike_trial.py 报错: 想请问一下原因?一定要使用GPU吗?
Using TensorFlow backend. 2021-10-09 18:10:20.332752: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 [2021-10-09 18:10:20] WARNING (tensorflow/MainThread) From C:\LSHApp\anaconda3\envs\tfv1\lib\site-packages\tensorflow\python\framework\op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version. Instructions for updating: Colocations handled automatically by placer. [2021-10-09 18:10:20] WARNING (tensorflow/MainThread) From C:\LSHApp\anaconda3\envs\tfv1\lib\site-packages\UCTB\model\ST_MGCN.py:86: dense (from tensorflow.python.layers.core) is deprecated and will be removed in a future version. Instructions for updating: Use keras.layers.dense instead. [2021-10-09 18:10:20] WARNING (tensorflow/MainThread) From C:\LSHApp\anaconda3\envs\tfv1\lib\site-packages\tensorflow\python\keras\backend.py:4010: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version. Instructions for updating: Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`. [2021-10-09 18:10:21] WARNING (tensorflow/MainThread) From C:\LSHApp\anaconda3\envs\tfv1\lib\site-packages\tensorflow\python\ops\math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.cast instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name CGRNN_Graph0/multi_gcl/gcl_0/weights:0 is illegal; using CGRNN_Graph0/multi_gcl/gcl_0/weights_0 instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name CGRNN_Graph0/multi_gcl/gcl_0/biases:0 is illegal; using CGRNN_Graph0/multi_gcl/gcl_0/biases_0 instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name CGRNN_Graph0/dense/kernel:0 is illegal; using CGRNN_Graph0/dense/kernel_0 instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name CGRNN_Graph0/dense_1/kernel:0 is illegal; using CGRNN_Graph0/dense_1/kernel_0 instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name CGRNN_Graph0/lstm/kernel:0 is illegal; using CGRNN_Graph0/lstm/kernel_0 instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name CGRNN_Graph0/lstm/recurrent_kernel:0 is illegal; using CGRNN_Graph0/lstm/recurrent_kernel_0 instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name CGRNN_Graph0/lstm/bias:0 is illegal; using CGRNN_Graph0/lstm/bias_0 instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name CGRNN_Graph1/multi_gcl/gcl_0/weights:0 is illegal; using CGRNN_Graph1/multi_gcl/gcl_0/weights_0 instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name CGRNN_Graph1/multi_gcl/gcl_0/biases:0 is illegal; using CGRNN_Graph1/multi_gcl/gcl_0/biases_0 instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name CGRNN_Graph1/dense/kernel:0 is illegal; using CGRNN_Graph1/dense/kernel_0 instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name CGRNN_Graph1/dense_1/kernel:0 is illegal; using CGRNN_Graph1/dense_1/kernel_0 instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name CGRNN_Graph1/lstm_1/kernel:0 is illegal; using CGRNN_Graph1/lstm_1/kernel_0 instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name CGRNN_Graph1/lstm_1/recurrent_kernel:0 is illegal; using CGRNN_Graph1/lstm_1/recurrent_kernel_0 instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name CGRNN_Graph1/lstm_1/bias:0 is illegal; using CGRNN_Graph1/lstm_1/bias_0 instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name CGRNN_Graph2/multi_gcl/gcl_0/weights:0 is illegal; using CGRNN_Graph2/multi_gcl/gcl_0/weights_0 instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name CGRNN_Graph2/multi_gcl/gcl_0/biases:0 is illegal; using CGRNN_Graph2/multi_gcl/gcl_0/biases_0 instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name CGRNN_Graph2/dense/kernel:0 is illegal; using CGRNN_Graph2/dense/kernel_0 instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name CGRNN_Graph2/dense_1/kernel:0 is illegal; using CGRNN_Graph2/dense_1/kernel_0 instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name CGRNN_Graph2/lstm_2/kernel:0 is illegal; using CGRNN_Graph2/lstm_2/kernel_0 instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name CGRNN_Graph2/lstm_2/recurrent_kernel:0 is illegal; using CGRNN_Graph2/lstm_2/recurrent_kernel_0 instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name CGRNN_Graph2/lstm_2/bias:0 is illegal; using CGRNN_Graph2/lstm_2/bias_0 instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name dense/kernel:0 is illegal; using dense/kernel_0 instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name dense/bias:0 is illegal; using dense/bias_0 instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name dense_1/kernel:0 is illegal; using dense_1/kernel_0 instead. [2021-10-09 18:10:23] INFO (tensorflow/MainThread) Summary name dense_1/bias:0 is illegal; using dense_1/bias_0 instead. Bike NYC ST_MMGCN_DCI_K1L1_V_F5 3818 No model found, start training Running Operation ('train_op',) Traceback (most recent call last): File "C:\LSHApp\anaconda3\envs\tfv1\lib\site-packages\tensorflow\python\client\session.py", line 1334, in _do_call return fn(*args) File "C:\LSHApp\anaconda3\envs\tfv1\lib\site-packages\tensorflow\python\client\session.py", line 1319, in _run_fn options, feed_dict, fetch_list, target_list, run_metadata) File "C:\LSHApp\anaconda3\envs\tfv1\lib\site-packages\tensorflow\python\client\session.py", line 1407, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.InvalidArgumentError: You must feed a value for placeholder tensor 'Placeholder_3' with dtype float and shape [?,28] [[{{node Placeholder_3}}]] During handling of the above exception, another exception occurred: Traceback (most recent call last): File "ST_MGCN_Obj.py", line 122, in <module> batch_size=int(args['BatchSize'])) File "C:\LSHApp\anaconda3\envs\tfv1\lib\site-packages\UCTB\model_unit\BaseModel.py", line 186, in fit op_names=op_names) File "C:\LSHApp\anaconda3\envs\tfv1\lib\site-packages\UCTB\model_unit\BaseModel.py", line 91, in _run outputs = self._session.run(output_tensor_list, feed_dict=feed_dict_tf) File "C:\LSHApp\anaconda3\envs\tfv1\lib\site-packages\tensorflow\python\client\session.py", line 929, in run run_metadata_ptr) File "C:\LSHApp\anaconda3\envs\tfv1\lib\site-packages\tensorflow\python\client\session.py", line 1152, in _run feed_dict_tensor, options, run_metadata) File "C:\LSHApp\anaconda3\envs\tfv1\lib\site-packages\tensorflow\python\client\session.py", line 1328, in _do_run run_metadata) File "C:\LSHApp\anaconda3\envs\tfv1\lib\site-packages\tensorflow\python\client\session.py", line 1348, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.InvalidArgumentError: You must feed a value for placeholder tensor 'Placeholder_3' with dtype float and shape [?,28] [[node Placeholder_3 (defined at C:\LSHApp\anaconda3\envs\tfv1\lib\site-packages\UCTB\model\ST_MGCN.py:110) ]] Caused by op 'Placeholder_3', defined at: File "ST_MGCN_Obj.py", line 102, in <module> ST_MGCN_Obj.build() File "C:\LSHApp\anaconda3\envs\tfv1\lib\site-packages\UCTB\model\ST_MGCN.py", line 110, in build external_input = tf.placeholder(tf.float32, [None, self._external_dim]) File "C:\LSHApp\anaconda3\envs\tfv1\lib\site-packages\tensorflow\python\ops\array_ops.py", line 2077, in placeholder return gen_array_ops.placeholder(dtype=dtype, shape=shape, name=name) File "C:\LSHApp\anaconda3\envs\tfv1\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 6833, in placeholder "Placeholder", dtype=dtype, shape=shape, name=name) File "C:\LSHApp\anaconda3\envs\tfv1\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 788, in _apply_op_helper op_def=op_def) File "C:\LSHApp\anaconda3\envs\tfv1\lib\site-packages\tensorflow\python\util\deprecation.py", line 507, in new_func return func(*args, **kwargs) File "C:\LSHApp\anaconda3\envs\tfv1\lib\site-packages\tensorflow\python\framework\ops.py", line 3300, in create_op op_def=op_def) File "C:\LSHApp\anaconda3\envs\tfv1\lib\site-packages\tensorflow\python\framework\ops.py", line 1801, in __init__ self._traceback = tf_stack.extract_stack() InvalidArgumentError (see above for traceback): You must feed a value for placeholder tensor 'Placeholder_3' with dtype float and shape [?,28] [[node Placeholder_3 (defined at C:\LSHApp\anaconda3\envs\tfv1\lib\site-packages\UCTB\model\ST_MGCN.py:110) ]]
您好: UCTB支持CPU以及GPU运行,从您的报错原因上来看,是在运行时喂入
external_input
数据出现了问题。
Windows 10 无GPU, python==3.6 tensorflow==1.13 Keras==2.2.4 h5py==2.9.0 UCTB==0.3.0 运行文件:UCTB/Experiments/ST_MGCN/bike_trial.py 报错: 想请问一下原因?一定要使用GPU吗?