Closed FengJiangJu closed 2 years ago
For the errors above, I cannot get the "Pick.csv" file. And I run the code in jupyter, I get the error information:FileNotFoundError: [Errno 2] No such file or directory: '/home/username/snap/PhaseNet/results/picks.csv'.
Hi, this seems an issue of tensorflow2.4. Could you try other tensorflow versions or use tensorflow-eigen?
After I opened the file named "example_batch_prediction.ipynb" , the following command was entered in my command window.
python phasenet/predict.py --model=model/190703-214543 --data_list=test_data/sac.csv --data_dir=test_data/sac --format=sac
Then the errors occurred, however, I didn't know why. So I was confused much and I will appreciate it if you can give me some advice or the solution. Thanks and best wishes to you, Dr Zhu.ERRORS: 2022-07-06 14:10:38,511 Pred log: results 2022-07-06 14:10:38,512 Dataset size: 16 2022-07-06 14:10:38.577036: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set 2022-07-06 14:10:38.577235: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: SSE4.1 SSE4.2 AVX AVX2 FMA To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2022-07-06 14:10:38.578232: I tensorflow/core/common_runtime/process_util.cc:146] Creating new thread pool with default inter op setting: 2. Tune using inter_op_parallelism_threads for best performance. 2022-07-06 14:10:38,602 Model: depths 5, filters 8, filter size 7x1, pool size: 4x1, dilation rate: 1x1 /home/username/miniconda3/lib/python3.7/site-packages/tensorflow/python/keras/legacy_tf_layers/convolutional.py:414: UserWarning:
tf.layers.conv2d
is deprecated and will be removed in a future version. Please Usetf.keras.layers.Conv2D
instead. warnings.warn('tf.layers.conv2d
is deprecated and ' /home/username/miniconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer_v1.py:1719: UserWarning:layer.apply
is deprecated and will be removed in a future version. Please uselayer.__call__
method instead. warnings.warn('layer.apply
is deprecated and ' /home/username/miniconda3/lib/python3.7/site-packages/tensorflow/python/keras/legacy_tf_layers/normalization.py:308: UserWarning:tf.layers.batch_normalization
is deprecated and will be removed in a future version. Please usetf.keras.layers.BatchNormalization
instead. In particular,tf.control_dependencies(tf.GraphKeys.UPDATE_OPS)
should not be used (consult thetf.keras.layers.BatchNormalization
documentation). 'tf.layers.batch_normalization
is deprecated and ' /home/username/miniconda3/lib/python3.7/site-packages/tensorflow/python/keras/legacy_tf_layers/core.py:268: UserWarning:tf.layers.dropout
is deprecated and will be removed in a future version. Please usetf.keras.layers.Dropout
instead. warnings.warn('tf.layers.dropout
is deprecated and ' /home/username/miniconda3/lib/python3.7/site-packages/tensorflow/python/keras/legacy_tf_layers/convolutional.py:1294: UserWarning:tf.layers.conv2d_transpose
is deprecated and will be removed in a future version. Please Usetf.keras.layers.Conv2DTranspose
instead. warnings.warn('tf.layers.conv2d_transpose
is deprecated and ' 2022-07-06 14:10:39.719785: I tensorflow/core/common_runtime/process_util.cc:146] Creating new thread pool with default inter op setting: 2. Tune using inter_op_parallelism_threads for best performance. 2022-07-06 14:10:39.792050: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:196] None of the MLIR optimization passes are enabled (registered 0 passes) 2022-07-06 14:10:39.869934: I tensorflow/core/platform/profile_utils/cpu_utils.cc:112] CPU Frequency: 3399905000 Hz 2022-07-06 14:10:40,025 restoring model model/190703-214543/model_95.ckpt Pred: 0%| | 0/1 [00:00<?, ?it/s]2022-07-06 14:10:40.850946: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:116] None of the MLIR optimization passes are enabled (registered 2) 2022-07-06 14:10:41.372910: W tensorflow/core/framework/op_kernel.cc:1763] OP_REQUIRES failed at mkl_softmax_op.cc:309 : Aborted: Operation received an exception:Status: 2, message: could not create a descriptor for a softmax forward propagation primitive, in file tensorflow/core/kernels/mkl/mkl_softmax_op.cc:306 Pred: 0%| | 0/1 [00:01<?, ?it/s] Traceback (most recent call last): File "/home/username/miniconda3/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1375, in _do_call return fn(*args) File "/home/username/miniconda3/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1360, in _run_fn target_list, run_metadata) File "/home/username/miniconda3/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1453, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.AbortedError: Operation received an exception:Status: 2, message: could not create a descriptor for a softmax forward propagation primitive, in file tensorflow/core/kernels/mkl/mkl_softmax_op.cc:306 [[{{node create_inputs/preds/Softmax}}]]During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "phasenet/predict.py", line 188, in
main(args)
File "phasenet/predict.py", line 181, in main
pred_fn(args, data_reader, log_dir=args.result_dir)
File "phasenet/predict.py", line 120, in pred_fn
feed_dict={model.drop_rate: 0, model.is_training: False},
File "/home/username/miniconda3/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 968, in run
run_metadata_ptr)
File "/home/username/miniconda3/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1191, in _run
feed_dict_tensor, options, run_metadata)
File "/home/username/miniconda3/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1369, in _do_run
run_metadata)
File "/home/username/miniconda3/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1394, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.AbortedError: Operation received an exception:Status: 2, message: could not create a descriptor for a softmax forward propagation primitive, in file tensorflow/core/kernels/mkl/mkl_softmax_op.cc:306
[[node create_inputs/preds/Softmax (defined at /home/username/snap/PhaseNet/phasenet/model.py:309) ]]
Errors may have originated from an input operation. Input Source operations connected to node create_inputs/preds/Softmax: create_inputs/Output/output_conv/BiasAdd (defined at /home/jufengjiang/snap/PhaseNet/phasenet/model.py:288)
Original stack trace for 'create_inputs/preds/Softmax': File "phasenet/predict.py", line 188, in
main(args)
File "phasenet/predict.py", line 181, in main
pred_fn(args, data_reader, log_dir=args.result_dir)
File "phasenet/predict.py", line 88, in pred_fn
model = UNet(config=config, input_batch=batch, mode="pred")
File "/home/username/snap/PhaseNet/phasenet/model.py", line 116, in init
self.build(input_batch, mode=mode)
File "/home/username/snap/PhaseNet/phasenet/model.py", line 480, in build
self.add_prediction_op()
File "/home/username/snap/PhaseNet/phasenet/model.py", line 309, in add_prediction_op
self.preds = tf.nn.softmax(output)
File "/home/username/miniconda3/lib/python3.7/site-packages/tensorflow/python/util/dispatch.py", line 201, in wrapper
return target(*args, **kwargs)
File "/home/username/miniconda3/lib/python3.7/site-packages/tensorflow/python/ops/nn_ops.py", line 3734, in softmax_v2
return _wrap_2d_function(logits, gen_nn_ops.softmax, axis, name)
File "/home/username/miniconda3/lib/python3.7/site-packages/tensorflow/python/ops/nn_ops.py", line 3620, in _wrap_2d_function
return compute_op(inputs, name=name)
File "/home/username/miniconda3/lib/python3.7/site-packages/tensorflow/python/ops/gen_nn_ops.py", line 10860, in softmax
"Softmax", logits=logits, name=name)
File "/home/username/miniconda3/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py", line 750, in _apply_op_helper
attrs=attr_protos, op_def=op_def)
File "/home/username/miniconda3/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 3536, in _create_op_internal
op_def=op_def)
File "/home/username/miniconda3/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 1990, in init
self._traceback = tf_stack.extract_stack()