@gcfengxu
Thank you for the effort.
But I think using sum(multiply(a, b)) to implement batch_dot is time-consuming and actually a detour.
We can directly use sum(multiply(a, b)) to implement the operations needed in CapsLayer, but it was proved to be of high computational complexity, as I did in earlier commits.
@gcfengxu Thank you for the effort.
But I think using
sum(multiply(a, b))
to implement batch_dot is time-consuming and actually a detour. We can directly usesum(multiply(a, b))
to implement the operations needed in CapsLayer, but it was proved to be of high computational complexity, as I did in earlier commits.Instead, I propose to replace
K.batch_dot
withtf.matmul
, see https://github.com/XifengGuo/CapsNet-Keras/tree/tf2.2Please check it out and continue contributing this repo.