Skip to content

No gradient defined for op: Select #14845

Closed

Description

@cesarsouza

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10 x64
  • TensorFlow installed from (source or binary): binary
  • TensorFlow version (use command below): 1.4
  • Python version: None
  • CUDA/cuDNN version: None
  • GPU model and memory: None
  • Exact command to reproduce: -

Describe the problem

It seems there is no gradient defined for the Select operation in the C++ API.

I am actually getting this issue while using the C++ API through the C# bindings provided by the TensorFlowSharp project, and for this reason I didn't fill the "exact command to reproduce" field above. However, seeing that @ops.RegisterGradient("Select") is placed in math.grad.py, and given that there is no analogous REGISTER_GRADIENT_OP("Select", SelectGrad) instruction in math_grad.cc, tells me that the gradient for the Select op is indeed still missing from the C++ API.

Hope its not a false alarm given that I didn't test libtensorflow.dll directly.

Activity

  1. facaiy commented on Nov 24, 2017

    @facaiy
    Member

    @cesarsouza Hi, I open a PR #14862 to add SelectGrad op.

  2. tatatodd commented on Nov 28, 2017

    @tatatodd
    Contributor

    Thanks @facaiy! Please update this bug when your PR #14862 lands.

  3. added
    stat:awaiting response
    on Nov 28, 2017
  4. gundamMC commented on Apr 22, 2018

    @gundamMC

    Is the problem fixed?
    I see that there's a pr but I'm still getting this error with TensorFlowSharp 1.7.0 (which supports TensorFlow 1.7.0).

  5. facaiy commented on Apr 22, 2018

    @facaiy
    Member

    @gundamMC SelectGrad has been merged into master branch. Could you give a reproducible example?

  6. gundamMC commented on Apr 22, 2018

    @gundamMC

    @facaiy Yep,
    https://github.com/gundamMC/Neural-Network-GUI-Demo/blob/master/NeuralNetwork/Network.cs
    You can pretty much ignore everything else in the repo as all the TensorFlowSharp stuff is in Network.cs.

  7. facaiy commented on Apr 23, 2018

    @facaiy
    Member

    Thank you, @gundamMC . Sorry that I don't know TensorFlowSharp (and .Net environment), could you report the issue to TensorFlowSharp, or give an example in native tensorflow code?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    stat:awaiting response

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions