zkmkarlsruhe / language-identification

Spoken Language Identification on Common Voice and AudioSet using Deep Learning
Other
36 stars 7 forks source link

Issue with the Google Colab - #1

Closed SinaArdehali closed 2 years ago

SinaArdehali commented 2 years ago

Hello , i have an issue with the Google Colab file. Here is my error with the last cell execution:

ValueError Traceback (most recent call last)

in () ----> 1 prediction = model.predict(audio) 9 frames /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/func_graph.py in wrapper(*args, **kwargs) 992 # invariant: `func_outputs` contains only Tensors, CompositeTensors, 993 # TensorArrays and `None`s. --> 994 func_outputs = nest.map_structure(convert, func_outputs, 995 expand_composites=True) 996 ValueError: in user code: /usr/local/lib/python3.7/dist-packages/keras/engine/training.py:1586 predict_function * return step_function(self, iterator) /usr/local/lib/python3.7/dist-packages/keras/engine/training.py:1576 step_function ** outputs = model.distribute_strategy.run(run_step, args=(data,)) /usr/local/lib/python3.7/dist-packages/tensorflow/python/distribute/distribute_lib.py:1286 run # /job:localhost/replica:0/task:0/device:GPU:0 /usr/local/lib/python3.7/dist-packages/tensorflow/python/distribute/distribute_lib.py:2849 call_for_each_replica `ReplicaContext`, which can only be called inside the function passed to /usr/local/lib/python3.7/dist-packages/tensorflow/python/distribute/distribute_lib.py:3632 _call_for_each_replica /usr/local/lib/python3.7/dist-packages/keras/engine/training.py:1569 run_step ** outputs = model.predict_step(data) /usr/local/lib/python3.7/dist-packages/keras/engine/training.py:1537 predict_step return self(x, training=False) /usr/local/lib/python3.7/dist-packages/keras/engine/base_layer.py:1037 __call__ outputs = call_fn(inputs, *args, **kwargs) /usr/local/lib/python3.7/dist-packages/keras/engine/functional.py:415 call inputs, training=training, mask=mask) /usr/local/lib/python3.7/dist-packages/keras/engine/functional.py:550 _run_internal_graph outputs = node.layer(*args, **kwargs) /usr/local/lib/python3.7/dist-packages/keras/engine/base_layer.py:1037 __call__ outputs = call_fn(inputs, *args, **kwargs) /usr/local/lib/python3.7/dist-packages/keras/engine/sequential.py:369 call return super(Sequential, self).call(inputs, training=training, mask=mask) /usr/local/lib/python3.7/dist-packages/keras/engine/functional.py:415 call inputs, training=training, mask=mask) /usr/local/lib/python3.7/dist-packages/keras/engine/functional.py:550 _run_internal_graph outputs = node.layer(*args, **kwargs) /usr/local/lib/python3.7/dist-packages/keras/engine/base_layer.py:1037 __call__ outputs = call_fn(inputs, *args, **kwargs) /usr/local/lib/python3.7/dist-packages/keras/saving/saved_model/utils.py:68 return_outputs_and_add_losses outputs, losses = fn(*args, **kwargs) /usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/def_function.py:885 __call__ else: /usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/def_function.py:924 _call "\n" /usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/function.py:3038 __call__ seen_names.add(proposal) /usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/function.py:3463 _maybe_define_function @tf.contrib.eager.defun /usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/function.py:3308 _create_graph_function TypeError: If the function inputs include non-hashable objects /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/func_graph.py:1007 func_graph_from_py_func for arg in (nest.flatten(func_args, expand_composites=True) + /usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/def_function.py:668 wrapped_fn /usr/local/lib/python3.7/dist-packages/tensorflow/python/saved_model/function_deserialization.py:294 restored_function_body def load_function_def_library(library, load_shared_name_suffix=None): ValueError: Could not find matching function to call loaded from the SavedModel. Got: Positional arguments (1 total): * Tensor("x:0", shape=(None, 80000, 2), dtype=float32) Keyword arguments: {} Expected these arguments to match one of the following 1 option(s): Option 1: Positional arguments (1 total): * TensorSpec(shape=(None, 80000, 1), dtype=tf.float32, name='x') Keyword arguments: {}