This repository was archived by the owner on Nov 17, 2023. It is now read-only.
Repository navigation
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I have a tensor (batches, a, b, 2, rows, cols) which is basically a bunch of pairs of (rows,cols) images - so let's simplify and say that I have a pair of images in a tensor A of shape (2, rows, cols).
It just so happens that this pair of images represents a coordinate (y,x), and I want to sample from a second tensor B at that coordinate.
coord = (y,x) = ( A[0,v,u], A[1,v,u] )Is there a Symbol operator that will let me create
C = sample( B , A )such that each pixelC[:,v,u]comes from the relevant pixelB[:,y,x]given the coordinate inAI was thinking that
gather_ndwould maybe be the right choice, but I'm getting hopelessly confused trying to feed my coordinates to it.Keep in mind please that I'm really wanting to do this for a batch of pairs of images - and I'm in C++ (hence using Symbol)
All reactions