Closed matt-gardner closed 7 years ago
Well, the last failure is one that's not so simple. Turns out you can't use K.repeat_elements
if you don't know how many times to repeat, because your input shape has a None
... I think I know how to fix this, but I'm done for today.
This PR does two things:
It moves
common.tensors
to its own top-level module,tensors
, and adds some structure to the module.It adds a
tensors.similarity_functions
module, which allows for configurable similarity computations, which form the core of anAttention
layer. Along with this, it adds alayers.attention
module, with a couple ofAttention
layers, and merges what waslayers.softmaxes
with it.