Skip to content

TensorFlow: Fixed shape issue where unknown shape will be induced from data. #2475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 10, 2019

Conversation

zeahmed
Copy link
Contributor

@zeahmed zeahmed commented Feb 8, 2019

This PR fixes #2458.

The problem addressed in this PR are

  1. Input is used to determine the shape. If there is one unknown dimension, it is computed from the input data. If there are several unknown dimension, the value computed from the input is equally distributed among unknown dimension.
  2. There is no batch dimension assumption on input now.
  3. Output shape are computed as previously done. However, if there are more than one unknown dimensions in the shape, a variable length vector is returned then.
  4. Created test to check for different type of shapes can be pass in and out of TF.

@zeahmed zeahmed changed the title Fixed shape issue where unknown shape will be induced from data. TensorFlow: Fixed shape issue where unknown shape will be induced from data. Feb 8, 2019
@codecov
Copy link

codecov bot commented Feb 8, 2019

Codecov Report

Merging #2475 into master will increase coverage by 0.01%.
The diff coverage is 98.79%.

@@            Coverage Diff             @@
##           master    #2475      +/-   ##
==========================================
+ Coverage   71.22%   71.23%   +0.01%     
==========================================
  Files         788      788              
  Lines      141071   141131      +60     
  Branches    16118    16115       -3     
==========================================
+ Hits       100484   100541      +57     
- Misses      36120    36124       +4     
+ Partials     4467     4466       -1
Flag Coverage Δ
#Debug 71.23% <98.79%> (+0.01%) ⬆️
#production 67.56% <92.3%> (-0.01%) ⬇️
#test 85.35% <100%> (+0.03%) ⬆️

Copy link
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

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

:shipit:

@wschin
Copy link
Member

wschin commented Feb 8, 2019

For (1), is it consistent to TF convention? #Resolved

Copy link
Contributor

@Ivanidzo4ka Ivanidzo4ka left a comment

Choose a reason for hiding this comment

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

:shipit:

@zeahmed
Copy link
Contributor Author

zeahmed commented Feb 9, 2019

For the case of one unknown dimension, yes. If there are more than one unknown dimension than there is no solution. This is just a way to it other way is to make a reshape transformer in ML.NET which user can use to define their input shape which then be mapped to TF shapes easily.


In reply to: 461891682 [](ancestors = 461891682)

@zeahmed zeahmed merged commit 7d7ebb6 into dotnet:master Feb 10, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Mar 24, 2022
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.

TensorFlowTransformer is not properly matching the input dimensions
4 participants