Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

Bug fix in forward and bi-directional lstm in handling bias #103

Merged
merged 1 commit into from
Jun 5, 2019
Merged

Bug fix in forward and bi-directional lstm in handling bias #103

merged 1 commit into from
Jun 5, 2019

Conversation

sonu1-p
Copy link
Contributor

@sonu1-p sonu1-p commented Jun 5, 2019

The converter was not setting the value of R bias correctly during
onnx conversion.

We simply set the R biases to zero since the current conversion code
is already setting W bias to the Keras' bias value. We expect the sum
of the biases Wb + Rb to be the same as Keras' bias since Keras uses
a single bias combining both.

Changes to be committed:

modified:   keras2onnx/ke2onnx/bidirectional.py
modified:   keras2onnx/ke2onnx/lstm.py
modified:   tests/test_layers.py

The converter was not setting the value of R bias correctly during
onnx conversion.

We simply set the R biases to zero since the current conversion code
is already setting W bias to the Keras' bias value. We expect the sum
of the biases Wb + Rb to be the same as Keras' bias since Keras uses
a single bias combining both.

Changes to be committed:

	modified:   keras2onnx/ke2onnx/bidirectional.py
	modified:   keras2onnx/ke2onnx/lstm.py
	modified:   tests/test_layers.py
@CLAassistant
Copy link

CLAassistant commented Jun 5, 2019

CLA assistant check
All committers have signed the CLA.

@jiafatom
Copy link
Collaborator

jiafatom commented Jun 5, 2019

@sonu1-p can you please sign CLA? thanks

@sonu1-p
Copy link
Contributor Author

sonu1-p commented Jun 5, 2019

Hi David, I have signed it, don't know why this page is not reflecting the same.

@sonu1-p
Copy link
Contributor Author

sonu1-p commented Jun 5, 2019

When I click on license/cla details, it says - You have signed the CLA for onnx/keras-onnx

@sonu1-p
Copy link
Contributor Author

sonu1-p commented Jun 5, 2019

Seems like it is reflected now. Thanks!

@jiafatom
Copy link
Collaborator

jiafatom commented Jun 5, 2019

LGTM, thank you very much for the change!

@jiafatom jiafatom self-requested a review June 5, 2019 21:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants