harvitronix / five-video-classification-methods

Code that accompanies my blog post outlining five video classification methods in Keras and TensorFlow
https://medium.com/@harvitronix/five-video-classification-methods-implemented-in-keras-and-tensorflow-99cad29cc0b5
MIT License
1.17k stars 479 forks source link

expected lstm_1_input to have 3 dimensions,but got array with shape (32, 40, 1, 2048) #120

Closed yunzhonghe2017 closed 5 years ago

yunzhonghe2017 commented 5 years ago

Traceback (most recent call last): File "D:\SZ\SZAR\空对空\Human Motion Perception\five-video-classification-methods-master\train.py", line 110, in main() File "D:\SZ\SZAR\空对空\Human Motion Perception\five-video-classification-methods-master\train.py", line 107, in main load_to_memory=load_to_memory, batch_size=batch_size, nb_epoch=nb_epoch) File "D:\SZ\SZAR\空对空\Human Motion Perception\five-video-classification-methods-master\train.py", line 81, in train workers=4) File "C:\Users\Dell\AppData\Local\Programs\Python\Python35\lib\site-packages\keras\legacy\interfaces.py", line 91, in wrapper return func(*args, **kwargs) File "C:\Users\Dell\AppData\Local\Programs\Python\Python35\lib\site-packages\keras\engine\training.py", line 1415, in fit_generator initial_epoch=initial_epoch) File "C:\Users\Dell\AppData\Local\Programs\Python\Python35\lib\site-packages\keras\engine\training_generator.py", line 213, in fit_generator class_weight=class_weight) File "C:\Users\Dell\AppData\Local\Programs\Python\Python35\lib\site-packages\keras\engine\training.py", line 1209, in train_on_batch class_weight=class_weight) File "C:\Users\Dell\AppData\Local\Programs\Python\Python35\lib\site-packages\keras\engine\training.py", line 749, in _standardize_user_data exception_prefix='input') File "C:\Users\Dell\AppData\Local\Programs\Python\Python35\lib\site-packages\keras\engine\training_utils.py", line 127, in standardize_input_data 'with shape ' + str(data_shape)) ValueError: Error when checking input: expected lstm_1_input to have 3 dimensions, but got array with shape (32, 40, 1, 2048)