Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

Added a couple missing 'Tensor.moments' functions. #363

Merged
merged 6 commits into from
Jul 14, 2019

Conversation

eaplatanios
Copy link
Contributor

No description provided.

@@ -2317,12 +2317,24 @@ public extension Tensor where Scalar: TensorFlowFloatingPoint {
/// dimensions are removed.
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a precondition which states that axes.rank must be 0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It has to be rank 1, but I didn't add it because it would cause lazy tensor materialization. The same is true for all reduction ops and we don't use any preconditions there.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh sorry I meant rank 1. Precondition should be added in comments at least.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I added it in the documentation strings.

@eaplatanios eaplatanios merged commit 8d0b1d8 into tensorflow:master Jul 14, 2019
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