Skip to content

ExtractImagePatches Gradient doesn't work if batch size is unknown #5501

Closed

Description

@liuyipei

See #3672 comment by @mohamedadaly
His fix is to add

  batch_size = array_ops.shape(op.inputs[0])[0]

after this:

  batch_size, rows_in, cols_in, channels = [
    dim.value for dim in op.inputs[0].get_shape()
  ]

in tensorflow/python/ops/array_grad.py

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions