Hello everyone
I found some problem in tf built-in function (tf.signal.stft)
when I type the code below, it will cause problem.
Device is MacBookPro with M1 Pro chip in jupyterlab
However, the problem won't cause on linux with CUDA.
Does anyone know how to fix the problem ?
Thanks.
code:
import numpy as np
import tensorflow as tf
random_waveform = np.random.normal(size=(16000))
tf_waveform = tf.constant(random_waveform)
tf_stft_waveform = tf.signal.stft(tf_waveform, frame_length=255, frame_step=128)
error message:
InvalidArgumentError Traceback (most recent call last)
Input In [1], in <cell line: 6>()
4 random_waveform = np.random.normal(size=(16000))
5 tf_waveform = tf.constant(random_waveform)
----> 6 tf_stft_waveform = tf.signal.stft(tf_waveform, frame_length=255, frame_step=128)
File ~/miniconda3/envs/AI/lib/python3.9/site-packages/tensorflow/python/util/traceback_utils.py:153, in filter_traceback.<locals>.error_handler(*args, **kwargs)
151 except Exception as e:
152 filtered_tb = _process_traceback_frames(e.__traceback__)
--> 153 raise e.with_traceback(filtered_tb) from None
154 finally:
155 del filtered_tb
File ~/miniconda3/envs/AI/lib/python3.9/site-packages/tensorflow/python/framework/ops.py:7164, in raise_from_not_ok_status(e, name)
7162 def raise_from_not_ok_status(e, name):
7163 e.message += (" name: " + name if name is not None else "")
-> 7164 raise core._status_to_exception(e) from None
InvalidArgumentError: Multiple Default OpKernel registrations match NodeDef '{{node ZerosLike}}': 'op: "ZerosLike" device_type: "DEFAULT" constraint { name: "T" allowed_values { list { type: DT_INT32 } } } host_memory_arg: "y"' and 'op: "ZerosLike" device_type: "DEFAULT" constraint { name: "T" allowed_values { list { type: DT_INT32 } } } host_memory_arg: "y"' [Op:ZerosLike]
1
Hi @nk7260ynpa
There is a problem with double registration of ZerosLike and OnesLike ops in tensorflow-macos==2.9.1
. Please upgrade to tensorflow-macos==2.9.2
to fix this issue you are seeing.