Skip to content
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

SpaceToDepthGrad and DepthToSpaceGrad are not aware of data_format #14243

Closed
manipopopo opened this issue Nov 4, 2017 · 1 comment
Closed
Labels
stat:awaiting tensorflower Status - Awaiting response from tensorflower type:bug Bug

Comments

@manipopopo
Copy link
Contributor

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): Linux Ubuntu 16.04
  • TensorFlow installed from (source or binary): binary
  • TensorFlow version (use command below): v1.4.0-rc1-11-g130a514 1.4.0
  • Python version: 3.5
  • Bazel version (if compiling from source):
  • GCC/Compiler version (if compiling from source):
  • CUDA/cuDNN version: CUDA 8.0 / cuDNN 6
  • GPU model and memory:
  • Exact command to reproduce:

tf.depth_to_space and tf.space_to_depth support data_format='NCHW' on GPU. However, _SpaceToDepthGrad and _DepthToSpaceGrad are not aware of data_format. Maybe they would need to propagate op.get_attr('data_format').

Source code / logs

import tensorflow as tf
x = tf.zeros([1, 4, 1, 1])
y = tf.depth_to_space(x, 2, data_format='NCHW')
# ValueError: Dimension size must be evenly divisible by 2 but is 1 for 'gradients ...
g = tf.gradients(y, x)
@asimshankar
Copy link
Contributor

Thanks for the report, this indeed seems to be an oversight in 4d69d04 which introduced data_format.

@yzhwang @wujingyue : Could you take a look?

@asimshankar asimshankar added stat:awaiting tensorflower Status - Awaiting response from tensorflower type:bug Bug labels Nov 5, 2017
martinwicke pushed a commit that referenced this issue Nov 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting tensorflower Status - Awaiting response from tensorflower type:bug Bug
Projects
None yet
Development

No branches or pull requests

2 participants