nicknochnack / LipNet

164 stars 127 forks source link

Data pipeline: data.as_numpy_iterator error #9

Open Noorallah1311 opened 1 year ago

Noorallah1311 commented 1 year ago
Screenshot 2023-07-20 at 3 43 55 PM

Hi, did anybody find the solution for this error? I'm running the code on Google Colab, Tensorflow 2.12.0 Any help is much appreciated.

abhishek-sameriya commented 1 year ago

if u find the solution please tell me i m facing this problem too

Ameya22Joshi commented 1 year ago

For the people who are using colab,

kido321 commented 1 year ago

@Ameya22Joshi Can you make it more clear on how to fix this issue?

SushovanHaldar commented 1 year ago

@Ameya22Joshi were you able to fix this issue? If yes can you please help us?

Ameya22Joshi commented 1 year ago

@Ameya22Joshi Can you make it more clear on how to fix this issue?

--> The return type of tensors is by default in form of tuple, but previously it was in the form of a list. Hence, we have to make it in tuple form. (def mappable_function(path:str) ->Tuple[tf.Tensor, tf.Tensor]:)

Ameya22Joshi commented 1 year ago

Screenshot 2023-07-20 at 3 43 55 PM Hi, did anybody find the solution for this error? I'm running the code on Google Colab, Tensorflow 2.12.0 Any help is much appreciated.

The problem arises because there is a hidden file .ipynb_checkpoints in the data. To delete this file:

Ameya22Joshi commented 1 year ago

@Ameya22Joshi were you able to fix this issue? If yes can you please help us?

Yes I was able to fix the issue. The solutions related to [data.as_numpy_iterator error] and [data/alignments/s1/.align] file not found error] are mentioned in the comments/replies.

Sheeevani commented 7 months ago

install specific version of tensorflow pip install tensorflow==2.10.1

Make changes in load_data function, update this line as file_name = path.split('/')[-1].split('.')[0]

Change '\' to '/' in below variables test_path = './data/s1/bbal6n.mpg' tf.convert_to_tensor(test_path).numpy().decode('utf-8').split('/')[-1].split('.')[0]

It will work fine then without any error in nextiterator :)

sphynxlee commented 6 months ago

install specific version of tensorflow pip install tensorflow==2.10.1

Make changes in load_data function, update this line as file_name = path.split('/')[-1].split('.')[0]

Change '\' to '/' in below variables test_path = './data/s1/bbal6n.mpg' tf.convert_to_tensor(test_path).numpy().decode('utf-8').split('/')[-1].split('.')[0]

It will work fine then without any error in nextiterator :)

Thank you, works for me!