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

Getting error while predicting on my own video.(On a similar network model) #28

Open
Mohsin365 opened this issue Jun 15, 2020 · 0 comments

Comments

@Mohsin365
Copy link

Error :
InvalidArgumentError Traceback (most recent call last)
in
50 sequence_start=(sequence_start+1)%32
51
---> 52 result_prob=model.predict(sequence_arr,None)
53 y_class= result_prob.argmax(axis=-1)
54 label=LABELS[y_class[0]]
InvalidArgumentError: Input to reshape is a tensor with 2048 values, but the requested shape has 524288
[[{{node dense_1/Reshape_2}}]]

Code Snippet :
X_ = np.asarray(openpose_output, dtype=np.float32)
X_ = X_[np.newaxis, :, :]
X_=X_.reshape(X_.shape[0],X_.shape[1],X_.shape[2]*X_.shape[3])
sequence_arr=np.append(X_[:,sequence_start:,:],X_[:,:sequence_start,:],axis=1)
sequence_start=(sequence_start+1)%32

        result_prob=model.predict(sequence_arr,None)
        y_class= result_prob.argmax(axis=-1)
        label=LABELS[y_class[0]]
        print("Iterator::",iterator," Label ::",label)
        cv2.putText(frame, label, (50, 150), cv2.FONT_HERSHEY_COMPLEX, .8, (255, 50, 0),lineType=cv2.LINE_AA)
@Mohsin365 Mohsin365 changed the title Getting error while predicting on my own video. Getting error while predicting on my own video.(On a similar network model) Jun 15, 2020
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

1 participant