Skip to content

Feature request: space_to_depth with overlapping blocks (like im2col) #2605

Closed

Description

@dbbert

Currently tf.space_to_depth only works for rearranging non-overlapping blocks into depth. It would be nice if also worked for overlapping blocks, with an extra parameter to set the stride:

  • A stride equal to the block size would be equivalent to the current non-overlapping behavior.
  • A stride equal to 1 would be equivalent to an im2col operation.

An im2col-like operation could be used to easily implement a locally connected layer ("convolution with unshared weights"), by combining it with an elementwise multiplication with the matrix that contains the local filters, followed by a summation along the channel dimension.

Activity

  1. self-assigned this
    on Jun 1, 2016
  2. added a commit that references this issue on Jun 3, 2016
    6b1b429
  3. jyshee commented on Jun 15, 2016

    @jyshee

    I tried to use tf.extract_image_patches to implement a locally layer and run into an error:

    LookupError: No gradient defined for operation 'local/ExtractImagePatches' (op type: ExtractImagePatches)

    I checked that tf.space_to_depth has the gradient definition but tf.extract_image_patches does not. And it seems not easy for me to implement the gradient. Any advice?

  4. bodokaiser commented on Jan 13, 2017

    @bodokaiser

    @jyshee did you get this working?

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

Metadata

Metadata

Assignees

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