Skip to content
This repository has been archived by the owner on Apr 11, 2021. It is now read-only.

Output shape of the similarity merge layer is still incorrect #16

Open
guxd opened this issue Jun 30, 2016 · 1 comment
Open

Output shape of the similarity merge layer is still incorrect #16

guxd opened this issue Jun 30, 2016 · 1 comment

Comments

@guxd
Copy link

guxd commented Jun 30, 2016

I use the latest version and check the similarity part of the model, i.e.,
qa_model = merge([question_output, answer_output], mode=similarity, output_shape=lambda x: x[:-1],name='similarity')
When I invoke qa_model.summary(), here is the screen output:
insuranceqa similarity

capture

The last layer (similarity) should have an output shape of (None, 1) but is (None, 200). I use the default 'cos' mode of Keras, it is (None,1). Also, the program doesn't work. It has nan loss.

@guxd guxd changed the title Output shape of similarity merge layer is still incorrect Output shape of the similarity merge layer is still incorrect Jun 30, 2016
@codekansas
Copy link
Owner

I fixed this just now. I think the output shape should just always be (None, 1). The thing is, I don't think it made a difference. I think the nan loss could be coming from somewhere else? Not sure. Let me know if this fixed it.

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

No branches or pull requests

2 participants