Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while training #37

Open
lachose1 opened this issue Oct 20, 2020 · 1 comment
Open

Error while training #37

lachose1 opened this issue Oct 20, 2020 · 1 comment

Comments

@lachose1
Copy link

Hello,
I recorded 3 different JPEG sequences of around 300 images each (repeating multiple time a movement, so maybe 20 images per movement multiple times). I ran the preprocess.py and the data seems to be correct in the data/data.csv. Now when I try to run train.py I get this error :

/home/hugo/anaconda3/envs/tensorrt/lib/python3.6/site-packages/sklearn/linear_model/_logistic.py:940: ConvergenceWarning: lbfgs failed to converge (status=1):
STOP: TOTAL NO. of f AND g EVALUATIONS EXCEEDS LIMIT.

Increase the number of iterations (max_iter) or scale the data as shown in:
    https://scikit-learn.org/stable/modules/preprocessing.html
Please also refer to the documentation for alternative solver options:
    https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression
  extra_warning_msg=_LOGISTIC_SOLVER_CONVERGENCE_MSG)

I tried modyfing train.py by modifying this line from

    pipeline = actionModel(config.classifier())

to

    pipeline = actionModel(config.classifier(max_iter=1000000))

Without success.

I also tried reducing the number of pictures if it could help the algorithm. They are 1280x720pixels, so maybe that's the issue? Also for a sequence of event, do I need to run train.py first then train_sequential.py aftewards, or can I just skip directly to train_sequential.py. Right now running the script throws this error :

Traceback (most recent call last):
  File "train_sequential.py", line 60, in <module>
    model = tf.keras.models.load_model('./models/lstm.h5')
  File "/home/hugo/anaconda3/envs/tensorrt/lib/python3.6/site-packages/tensorflow_core/python/keras/saving/save.py", line 149, in load_model
    loader_impl.parse_saved_model(filepath)
  File "/home/hugo/anaconda3/envs/tensorrt/lib/python3.6/site-packages/tensorflow_core/python/saved_model/loader_impl.py", line 83, in parse_saved_model
    constants.SAVED_MODEL_FILENAME_PB))
OSError: SavedModel file does not exist at: ./models/lstm.h5/{saved_model.pbtxt|saved_model.pb}

Thanks!

@jackweiwang
Copy link

model = tf.keras.models.load_model('./models/lstm.h5')
change to
model = lstm_model()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants