Code Monkey home page Code Monkey logo

lipnet's People

Contributors

nicknochnack avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

lipnet's Issues

Custom dataset

Can somebody help me, how to implement this on a custom dataset in which me upload a video and for a longer duration video example 1,2 min, i really need to build this project

Gui version with wav2lip functionality

It would be great if we got a gui that let us easily train our own model and output a wav2lip version with text we want, even better if it syncs with tts technology

can any one please help to debug this?

File "C:\Users\harsh\AppData\Local\Programs\Python\Python312\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 584, in run_script
exec(code, module.dict)
File "D:\LipNet\LipNet\app\streamlitapp.py", line 48, in
model = load_model()
^^^^^^^^^^^^
File "D:\LipNet\lipNet\app\modelutil.py", line 23, in load_model
model.add(Bidirectional(LSTM(128, kernel_initializer='Orthogonal', return_sequences=True)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\harsh\AppData\Local\Programs\Python\Python312\Lib\site-packages\keras\src\layers\rnn\lstm.py", line 463, in init
cell = LSTMCell(
^^^^^^^^^
File "C:\Users\harsh\AppData\Local\Programs\Python\Python312\Lib\site-packages\keras\src\layers\rnn\lstm.py", line 121, in init
self.kernel_initializer = initializers.get(kernel_initializer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\harsh\AppData\Local\Programs\Python\Python312\Lib\site-packages\keras\src\initializers_init
.py", line 118, in get
raise ValueError(

Getting Error in this line imageio.mimsave('./animation.gif', val[0][0], duration=10)

KeyError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/PIL/Image.py in fromarray(obj, mode)
3079 try:
-> 3080 mode, rawmode = _fromarray_typemap[typekey]
3081 except KeyError as e:

KeyError: ((1, 1, 1), '<f4')

The above exception was the direct cause of the following exception:

TypeError Traceback (most recent call last)
3 frames
/usr/local/lib/python3.10/dist-packages/PIL/Image.py in fromarray(obj, mode)
3081 except KeyError as e:
3082 msg = "Cannot handle this data type: %s, %s" % typekey
-> 3083 raise TypeError(msg) from e
3084 else:
3085 rawmode = mode

TypeError: Cannot handle this data type: (1, 1, 1), <f4

its showing this error

Error's

Can u check full code cause I'm taking a lot of error.I get my first error on frames, alignments = data.as_numpy_iterator().next() on 2. Part of the code

Adding installation docs and requirements.txt

Adding proper installations docs and a requirements.txt file will serve as a great path to setup the project and especially for beginners who are starting to setup a nominal python project.

FileNotFoundError: [Errno 2] No such file or directory: 'data/alignments/s1/.align'

While running this code cell data.as_numpy_iterator().next() i am receiving this error. It is going in the alignments folder but the location is in s1 folder as mentioned in this code
data = tf.data.Dataset.list_files('./data/s1/*.mpg')
I am using google collab and I am not using gdown.extractall('data.zip')
instead, I am using this line of code to unzip the file
!unzip -q "/content/drive/MyDrive/data.zip"
This is changing the folder's file path and causing this error.

Here is the full error I am receiving:
`
UnknownError: {{function_node _wrapped__IteratorGetNext_output_types_2_device/job:localhost/replica:0/task:0/device:CPU:0}} FileNotFoundError: [Errno 2] No such file or directory: 'data/alignments/s1/data/s1/pgay3a.align'
Traceback (most recent call last):

File "/usr/local/lib/python3.9/dist-packages/tensorflow/python/ops/script_ops.py", line 269, in call
return func(device, token, args)

File "/usr/local/lib/python3.9/dist-packages/tensorflow/python/ops/script_ops.py", line 147, in call
outputs = self._call(device, args)

File "/usr/local/lib/python3.9/dist-packages/tensorflow/python/ops/script_ops.py", line 154, in _call
ret = self._func(*args)

File "/usr/local/lib/python3.9/dist-packages/tensorflow/python/autograph/impl/api.py", line 642, in wrapper
return func(*args, **kwargs)

File "", line 8, in load_data
alignments = load_alignments(alignment_path)

File "", line 2, in load_alignments
with open(path,'r') as f:

FileNotFoundError: [Errno 2] No such file or directory: 'data/alignments/s1/data/s1/pgay3a.align'

 [[{{node EagerPyFunc}}]] [Op:IteratorGetNext]

`

After 51 epoch stop iteration error

I am running this code. In the model.fit() cell, after 51 epoch stop iteration error occured. The error is shown below:

[mpeg1video @ 0x7fc7dc041980] ac-tex damaged at 22 17
[mpeg1video @ 0x7fc7dc041980] Warning MVs not available

StopIteration Traceback (most recent call last)
Cell In[47], line 1
----> 1 model.fit(train, validation_data=test, epochs=100, callbacks=[checkpoint_callback, schedule_callback, example_callback])

File /opt/conda/lib/python3.10/site-packages/keras/utils/traceback_utils.py:70, in filter_traceback..error_handler(*args, **kwargs)
67 filtered_tb = _process_traceback_frames(e.traceback)
68 # To get the full stack trace, call:
69 # tf.debugging.disable_traceback_filtering()
---> 70 raise e.with_traceback(filtered_tb) from None
71 finally:
72 del filtered_tb

Cell In[42], line 6, in ProduceExample.on_epoch_end(self, epoch, logs)
5 def on_epoch_end(self, epoch, logs=None) -> None:
----> 6 data = self.dataset.next()
7 yhat = self.model.predict(data[0])
8 decoded = tf.keras.backend.ctc_decode(yhat, [75,75], greedy=False)[0][0].numpy()

StopIteration:

Please help to resolve this issue

Model Training Error

Epoch 1/100

2024-05-01 23:43:13.969904: E tensorflow/core/util/util.cc:131] oneDNN supports DT_INT32 only on platforms with AVX-512. Falling back to the default Eigen-based implementation if present.
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1714587194.472980 24744 service.cc:145] XLA service 0x7f96d00045f0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
I0000 00:00:1714587194.473000 24744 service.cc:153] StreamExecutor device (0): Host, Default Version
I0000 00:00:1714587195.078536 24744 device_compiler.h:188] Compiled cluster using XLA! This line is logged at most once for the lifetime of the process.
2024-05-01 23:43:16.503091: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503140: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503175: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503192: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503218: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503238: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503258: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503267: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503284: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503306: W tensorflow/core/framework/local_rendezvous.cc:404] Local rendezvous is aborting with status: INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
[[{{function_node __inference_one_step_on_data_29491}}{{node sequential_1/time_distributed_1/Reshape_71}}]]
2024-05-01 23:43:16.503317: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503326: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503337: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503354: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503371: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503388: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503404: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503421: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503436: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503453: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503468: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503483: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503498: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503512: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503527: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503543: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503554: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503568: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503579: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503591: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503606: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503611: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503617: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503625: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503630: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503637: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503644: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503655: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503664: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503672: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503677: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503684: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503688: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503696: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503710: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503716: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503726: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503739: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503755: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503766: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503780: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503790: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503808: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503815: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503823: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503830: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503837: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503850: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503857: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503869: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503878: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503887: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503896: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503903: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503913: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503919: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503929: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503935: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503946: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503954: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503968: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503981: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.503993: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.504009: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.504041: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1
2024-05-01 23:43:16.504080: W tensorflow/core/framework/op_kernel.cc:1839] OP_REQUIRES failed at reshape_op.h:65 : INVALID_ARGUMENT: Only one input size may be -1, not both 0 and 1

�[0;31m---------------------------------------------------------------------------�[0m
�[0;31mInvalidArgumentError�[0m Traceback (most recent call last)
Cell �[0;32mIn[39], line 1�[0m
�[0;32m----> 1�[0m �[43mmodel�[49m�[38;5;241;43m.�[39;49m�[43mfit�[49m�[43m(�[49m�[43mtrain�[49m�[43m,�[49m�[43m �[49m�[43mvalidation_data�[49m�[38;5;241;43m=�[39;49m�[43mtest�[49m�[43m,�[49m�[43m �[49m�[43mepochs�[49m�[38;5;241;43m=�[39;49m�[38;5;241;43m100�[39;49m�[43m,�[49m�[43m �[49m�[43mcallbacks�[49m�[38;5;241;43m=�[39;49m�[43m[�[49m�[43mcheckpoint_callback�[49m�[43m,�[49m�[43m �[49m�[43mschedule_callback�[49m�[43m,�[49m�[43m �[49m�[43mexample_callback�[49m�[43m]�[49m�[43m)�[49m

File �[0;32m/media/aditya/Foxin 256GB SATA/copy/LipNet-main/venv/lib/python3.10/site-packages/keras/src/utils/traceback_utils.py:122�[0m, in �[0;36mfilter_traceback..error_handler�[0;34m(*args, **kwargs)�[0m
�[1;32m 119�[0m filtered_tb �[38;5;241m=�[39m process_traceback_frames(e�[38;5;241m.�[39m__traceback_)
�[1;32m 120�[0m �[38;5;66;03m# To get the full stack trace, call:�[39;00m
�[1;32m 121�[0m �[38;5;66;03m# keras.config.disable_traceback_filtering()�[39;00m
�[0;32m--> 122�[0m �[38;5;28;01mraise�[39;00m e�[38;5;241m.�[39mwith_traceback(filtered_tb) �[38;5;28;01mfrom�[39;00m �[38;5;28;01mNone�[39;00m
�[1;32m 123�[0m �[38;5;28;01mfinally�[39;00m:
�[1;32m 124�[0m �[38;5;28;01mdel�[39;00m filtered_tb

File �[0;32m/media/aditya/Foxin 256GB SATA/copy/LipNet-main/venv/lib/python3.10/site-packages/tensorflow/python/eager/execute.py:53�[0m, in �[0;36mquick_execute�[0;34m(op_name, num_outputs, inputs, attrs, ctx, name)�[0m
�[1;32m 51�[0m �[38;5;28;01mtry�[39;00m:
�[1;32m 52�[0m ctx�[38;5;241m.�[39mensure_initialized()
�[0;32m---> 53�[0m tensors �[38;5;241m=�[39m pywrap_tfe�[38;5;241m.�[39mTFE_Py_Execute(ctx�[38;5;241m.�[39m_handle, device_name, op_name,
�[1;32m 54�[0m inputs, attrs, num_outputs)
�[1;32m 55�[0m �[38;5;28;01mexcept�[39;00m core�[38;5;241m.�[39m_NotOkStatusException �[38;5;28;01mas�[39;00m e:
�[1;32m 56�[0m �[38;5;28;01mif�[39;00m name �[38;5;129;01mis�[39;00m �[38;5;129;01mnot�[39;00m �[38;5;28;01mNone�[39;00m:

�[0;31mInvalidArgumentError�[0m: Graph execution error:

Detected at node sequential_1/time_distributed_1/Reshape_71 defined at (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main

File "/usr/lib/python3.10/runpy.py", line 86, in _run_code

File "/media/LipNet-main/venv/lib/python3.10/site-packages/keras/src/backend/tensorflow/numpy.py", line 1778, in reshape

Only one input size may be -1, not both 0 and 1
[[{{node sequential_1/time_distributed_1/Reshape_71}}]] [Op:__inference_one_step_on_iterator_29626]

InvalidArgumentError: Graph execution error

I was trying out the new code and running the training and model fitting, however, everytime I complete 1 epoch I get this error. Any idea?

InvalidArgumentError: Graph execution error:

ValueError: Attempt to convert a value (None) with an unsupported type (<class 'NoneType'>) to a Tensor.
Traceback (most recent call last):

ValueError: Dimensions must be equal

When I try to run model.fit I'm getting this error about dimensions not being equal and when I substitute 40 with 75 in the code, it starts working. Is that okay to do or will it affect the model's performance?
image
image
image

model.load_weights('models/checkpoint') please help with this error

ValueError Traceback (most recent call last)
Cell In[86], line 1
----> 1 model.load_weights('models/checkpoint')

File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\keras\utils\traceback_utils.py:70, in filter_traceback..error_handler(*args, **kwargs)
67 filtered_tb = _process_traceback_frames(e.traceback)
68 # To get the full stack trace, call:
69 # tf.debugging.disable_traceback_filtering()
---> 70 raise e.with_traceback(filtered_tb) from None
71 finally:
72 del filtered_tb

File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\keras\optimizers\optimizer.py:147, in _BaseOptimizer._create_or_restore_slot_variable(self, **kwargs)
146 def _create_or_restore_slot_variable(self, **kwargs):
--> 147 raise ValueError(
148 "You are trying to restore a checkpoint from a legacy Keras "
149 "optimizer into a v2.11+ Optimizer, which can cause "
150 "errors. Please update the optimizer referenced in your code "
151 "to be an instance of "
152 "tf.keras.optimizers.legacy.Optimizer, e.g.: "
153 f"tf.keras.optimizers.legacy.{self.__class__.__name__}."
154 )

ValueError: You are trying to restore a checkpoint from a legacy Keras optimizer into a v2.11+ Optimizer, which can cause errors. Please update the optimizer referenced in your code to be an instance of tf.keras.optimizers.legacy.Optimizer, e.g.: tf.keras.optimizers.legacy.Adam.
Screenshot 2023-10-01 224222

accuracy calculation

how to get accuracy and what's the accuracy for this model can anyone tell me its urgent

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.