4

Where is the implementation of tf.extract_image_patches? I checked the tensorflow repository I could not find it.

The file tensorflow/core/kernels/extract_image_patches_op.cc does not contain an implementation.

Maxim
  • 52,561
  • 27
  • 155
  • 209
GDG
  • 397
  • 5
  • 14

1 Answers1

8

That's an interesting question. The path is as follows:

At this point, it's getting out of tensorflow source base, because Eigen is from the third-party eigen library (GitHub mirror). Its source code is somewhat non-trivially downloaded and linked to tensorflow, but right now we are interested in Eigen::TensorMap::extract_image_patches() function.

Note that particular version of Eigen library may be different in different builds of tensorflow, which you should check in the bazel config.

Maxim
  • 52,561
  • 27
  • 155
  • 209