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

Add conversion for FloorDiv, ZerosLike and Fix bug in slice #439

Merged
merged 2 commits into from
Apr 17, 2020

Conversation

sonu1-p
Copy link
Contributor

@sonu1-p sonu1-p commented Apr 15, 2020

This commit adds model conversion for FloorDiv, ZerosLike

Also fixes a bug in slice conversion. When the begin index is
less than zero, the end index cannot be calculated by adding size.

eg: begin = -1 and size = 1, will give end index = 0 which is incorrect.
The end should be int max in such cases.

Changes to be committed:
modified: keras2onnx/_builtin.py

This commit adds model conversion for FloorDiv, ZerosLike

Also fixes a bug in slice conversion. When the begin index is
less than zero, the end index cannot be calculated by adding size.

eg: begin = -1 and size = 1, will give end index = 0 which is incorrect.
The end should be int max in such cases.

Changes to be committed:
	modified:   keras2onnx/_builtin.py
@CLAassistant
Copy link

CLAassistant commented Apr 15, 2020

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@jiafatom jiafatom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your efforts! Can you add unit tests for the new ops in test_layers.py?

@wenbingl
Copy link
Member

Thanks for the contribution, it would be nicer to have some unit test, we have some example like test_tf_xxxx in test_layers.py for your reference to add an unit test.

@jiafatom jiafatom merged commit 1e1dbb5 into onnx:master Apr 17, 2020
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.

4 participants