Skip to content

TensorFlowTransformer is not properly matching the input dimensions #2458

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

Closed
LucasFievet opened this issue Feb 7, 2019 · 2 comments · Fixed by #2475
Closed

TensorFlowTransformer is not properly matching the input dimensions #2458

LucasFievet opened this issue Feb 7, 2019 · 2 comments · Fixed by #2475
Assignees
Labels
bug Something isn't working

Comments

@LucasFievet
Copy link

LucasFievet commented Feb 7, 2019

System information

  • OS version/distro: Windows 10/Pro
  • .NET Version (eg., dotnet --info): .NET Version 2.1.202
  • ML.TensorFlow Version 0.10

Issue

  • What did you do?: Executed a TensorFlow model using TensorFlowEstimator
  • What happened?: Mapper does not properly match the input dimensions to the TensorFlow model dimensions
  • What did you expect?: Properly matched dimensions

Source code / logs

TensorFlowTransform.cs, Lines 810 - 875

Line 853:

var d = originalShape.NumDimensions > 2 ? Math.Pow(typeValueCount / valCount, 1.0 / (originalShape.NumDimensions - 2)) : 1;

The case with 2 dimensions, where the originalShape is [1, ?] is not matched properly.

@Ivanidzo4ka Ivanidzo4ka added the bug Something isn't working label Feb 7, 2019
@Ivanidzo4ka
Copy link
Contributor

@yaeldekel

var d = originalShape.NumDimensions > 2 ? Math.Pow(typeValueCount / valCount, 1.0 / (originalShape.NumDimensions - 2)) : 1;

do you know why we setting variable length only for tensors with size more than 2?
@zeahmed do we have tests with variable length? If yes, I believe it's probably for images, can we have test for two dimensional model?

@zeahmed
Copy link
Contributor

zeahmed commented Feb 7, 2019

No, this is the bug and I am going to make a fix for it.

@zeahmed zeahmed self-assigned this Feb 7, 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
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants