Orkis-Research / Pytorch-Quaternion-Neural-Networks

This repository is an update to all previous repositories with implementations of various Quaternion-valued Neural Networks in PyTorch
GNU General Public License v3.0
204 stars 54 forks source link

Hi, * is element multiply, I think here should be quaternion multiply. Thank you. #5

Closed lihao0214 closed 5 years ago

lihao0214 commented 5 years ago

https://github.com/Orkis-Research/Pytorch-Quaternion-Neural-Networks/blob/64d06df67af1eb7ebbc72dad62da10ebee4c4258/recurrent_models.py#L135

TParcollet commented 5 years ago

Hi there !

I invite to take a look at our paper on QRNN / QLSTM. It's actually a component-wise product, due to the fact that we want the gate to control the amount of information with want to get from each component. Plus, it's not stable at all when used with the Hamilton product (you can try by replace the * by hamilton_product(). Indeed, one must redefine gates in the quaternion domain to do so!