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

model variable vs base_model #10

Open
roccolocko opened this issue Nov 13, 2017 · 3 comments
Open

model variable vs base_model #10

roccolocko opened this issue Nov 13, 2017 · 3 comments
Labels
base_model 与 model 为什么会有两个模型

Comments

@roccolocko
Copy link

roccolocko commented Nov 13, 2017

Hello ypwhs,
On the ctc code you are creating a model called model:
model = Model(input=[input_tensor, labels, input_length, label_length], output=[loss_out])

And that is the one you train, but when you make the prediction you use a the model called base_model.
y_pred = base_model.predict(X_test)

Why is that? Is it correct?
Shouldn't you use model.predict? If yes, what would be a correct way to call it, since is waiting for 4 parameters, what should it be sent on "labels", "input_length" and "label_length".

Thank you.

@syw2014
Copy link

syw2014 commented Aug 23, 2018

@roccolocko Have you solved this problem?

@ypwhs
Copy link
Owner

ypwhs commented Aug 23, 2018

Due to the limitations of keras, ctc loss must be built in the model, so in fact model is just a training model, base_model is the real model.

@syw2014
Copy link

syw2014 commented Aug 24, 2018

@ypwhs Thank you for project and your reply, Got it !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
base_model 与 model 为什么会有两个模型
Projects
None yet
Development

No branches or pull requests

3 participants