zhangchenxu528 / FACIAL

FACIAL: Synthesizing Dynamic Talking Face With Implicit Attribute Learning. ICCV, 2021.
GNU Affero General Public License v3.0
376 stars 83 forks source link

run on tensorflow2.x? #81

Open mendynew opened 1 year ago

mendynew commented 1 year ago

Tensorflow 1.x is not supported in Google colab now.

ValueError: Tensorflow 1 is unsupported in Colab.

With tensorflow 2.x, I modified the code in audioface/_util/audio_handler.py import tensorflow as tf to import tensorflow.compat.v1 as tf

But after finished the first several steps, I encountered error as below during "python audio_preprocessing.py"

Traceback (most recent call last): File "audio_preprocessing.py", line 60, in processed_audio = process_audio(ds_fname, audio4deepspeech, fps) # generate audio feature File "audio_preprocessing.py", line 38, in process_audio processed_audio = audio_handler.process(audio, fps) File "/content/FACIAL/audio2face/_utils/audio_handler.py", line 59, in process return self.convert_to_deepspeech(audio, fps) File "/content/FACIAL/audio2face/_utils/audio_handler.py", line 108, in convert_to_deepspeech input_tensor = graph.get_tensor_by_name('deepspeech/input_node:0') File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/framework/ops.py", line 4128, in get_tensor_by_name return self.as_graph_element(name, allow_tensor=True, allow_operation=False) File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/framework/ops.py", line 3952, in as_graph_element return self._as_graph_element_locked(obj, allow_tensor, allow_operation) File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/framework/ops.py", line 3992, in _as_graph_element_locked raise KeyError("The name %s refers to a Tensor which does not " KeyError: "The name 'deepspeech/input_node:0' refers to a Tensor which does not exist. The operation, 'deepspeech/input_node', does not exist in the graph."

Any body solved such problem?