Skip to content

[Relay][Op][TF] Complete tensor array unstack with all ranks support#4309

Merged
zhiics merged 1 commit intoapache:masterfrom
wweic:add-unstack
Nov 12, 2019
Merged

[Relay][Op][TF] Complete tensor array unstack with all ranks support#4309
zhiics merged 1 commit intoapache:masterfrom
wweic:add-unstack

Conversation

@wweic
Copy link
Contributor

@wweic wweic commented Nov 11, 2019

Thanks @soiferj for providing Range fix in his branch, I need it to fix the unit test, so included in the PR.

cc @icemelon9 @kevinthesun @zhiics @yongwww @srkreddy1238 @soiferj

Copy link
Contributor

@kevinthesun kevinthesun left a comment

Choose a reason for hiding this comment

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

LGTM

if any(['Rank' in param for param in params]):
limit = params.pop('Rank').asnumpy()[0]
else:
limit = _infer_value_simulated(inputs[1], params).asnumpy()[0]
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks a lot for adding this. While you're here, would you mind adding the fix to _transpose() too?

...
except (IndexError, KeyError):
    axes = _infer_value_simulated(inputs[1], params)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@soiferj How can I reproduce the failure? I can add it if I can add a test case for it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it should reproduce when the perm input is a variable, instead of a constant. For a test case, I suppose you could make it a placeholder.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@soiferj Thank you! I thought about it a bit, it doesn't seem to relate to my pr though the fix looks similar. We can definitely send another pr to fix later. I'd suggest we keep the pr single purpose. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, that's fine :)

Copy link
Member

@yongwww yongwww left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@zhiics zhiics left a comment

Choose a reason for hiding this comment

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

LGTM

@zhiics zhiics merged commit 03a29da into apache:master Nov 12, 2019
@zhiics
Copy link
Member

zhiics commented Nov 12, 2019

Thanks everyone. This is now merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants