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

get stuck at adding lstm layer #77

Closed VictorLeeLk closed 6 years ago

VictorLeeLk commented 6 years ago

after extracting features by running extract_features.py,then I run train.py,the model is lstm,but when print the input shpe (16,2048),it got stuck at model.add(LSTM(...)),what's wrong?thank you!

harvitronix commented 6 years ago

When you say it got stuck, do you mean it froze? If that's the case, it's likely that you've run out of memory. The LSTM defaults to 2048 units which is quite memory intensive. Reduce it significantly (try just 8 units) to see if that solves the problem, then scale up to the point that it stops working, and use the one before that.