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

Here you perform Hadamard product/ point-wise product b/w image & word layers. How to perform Bilinear product? #9

Open
WrathofBhuvan11 opened this issue Sep 21, 2020 · 0 comments

Comments

@WrathofBhuvan11
Copy link

let's say there are 2 encoders for image & word namely e_1 & e_2 respectively.
we know that both e_1 and e_2 has shape of (None, 1024).
and performing Hadamard/ point wise multiplication results in output tensor of shape (None, 1024) and this is connected to Linear DNN & so on .
My question is how to implement a keras layer which performs Bilinear tensor product b/w e_1 & e_2.
output = e_1 ⊗ e_2
so shape of output is (None, 1024, 1024) which can be connected to CNN down the model.
But how to implement This Keras layer for Bilinear product, e_1 ⊗ e_2 which takes (None, 1024) shaped input
and gives out output of shape (none, 1024, 1024) ??

@WrathofBhuvan11 WrathofBhuvan11 changed the title Here you perform Hadamard product/ point-wise product b/w 2 layer. How to perform Bilinear product ? Here you perform Hadamard product/ point-wise product b/w image & word layers. How to perform Bilinear product ? Sep 21, 2020
@WrathofBhuvan11 WrathofBhuvan11 changed the title Here you perform Hadamard product/ point-wise product b/w image & word layers. How to perform Bilinear product ? Here you perform Hadamard product/ point-wise product b/w image & word layers. How to perform Bilinear product? Sep 21, 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