breadbread1984 / R3DCNN

this project implements the hand gesture recognition algorithm introduced in paper online detection and classification of dynamic hand gestures with recurrent 3d convolutional neural networks
98 stars 24 forks source link

Some errors occurred during training #13

Closed likestudy closed 5 years ago

likestudy commented 5 years ago

When i try to train this model with $ python train_r3dcnn.py , there come to some errors. Sometimes the error is : InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [512] rhs shape= [4096] But most of the time , the error is : NotFoundError (see above for traceback): Key rnn/multi_rnn_cell/cell_0/basic_lstm_cell/bias not found in checkpoint At the beginning, i think it may be a problem with the version of tensorflow , so i tried different versions , but the second error is still there. As i try to change the key of checkpoint by this way https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/rnn/python/tools/checkpoint_convert.py , i still get the same error. Anyone has every meet this problem , and how to fix it ? Thanks very much for any suggestions.

breadbread1984 commented 5 years ago

have you download the pretrained model of c3d and place its checkpoint directory under the root directory of this project? you may train c3d on your machine from scratch. The checkpoints generated by different version may not compatible with each other.

likestudy commented 5 years ago

Thanks for your reply. I had downloaded your model of c3d from baidu cloud. After unzipped it, i put the folder named 'action_classifier_model ' under the root directory of this project. As there is a folder in the folder , i extracted the files of checkpoints to the first folder. And i changed the code of path in train_r3dcnn.py as: gesture_classifier = tf.estimator.Estimator(model_fn = action_model_fn, model_dir = "./action_classifier_model"); Is there any problem with this? Under your reminder, i changed the code to : gesture_classifier = tf.estimator.Estimator(model_fn = action_model_fn, model_dir = "./action_classifier_model/model.ckpt-84765"); (I changed the checkpoint file to only contain the ckpt-84765) It seems to be running correctly until now。Maybe I made a stupid mistake at the beginning? Or the second method is not correct。

breadbread1984 commented 5 years ago

OK

buaa-luzhi commented 4 years ago

@likestudy Are you still working on this. Did you get good test results using ActionRecognition.py script? Thank you very much!