-
Notifications
You must be signed in to change notification settings - Fork 361
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
How to get the coords index of previous coords after convolution with stride more than one #70
Comments
When generating the strided map, I use floor to make all the generated coords divisible by the stride. In this case, there are many coords that are not equal to the strided coords. What behavior are you looking for? Do you want exact coords only? Or do you want all coords that map to the strided coords using floor? |
Thanks for your quick reply. I want all coords that map to the strided coords using floor. In detail, I have some feature that is associate with the coords, but this feature can not be convolved, so after strided covolution I want to extract the new feature cooresponding to the the new coords. If i can get the index, then this problem can be solved. |
I added the function Usage: sinput = SparseTensor(...)
soutput = stride_2_conv(sinput)
cm = sinput.coords_man # or soutput.coords_man. Doesn't matter.
ins, outs = cm.get_coords_map(1, 2)
inc = cm.get_coords(1)
outc = cm.get_coords(2)
for i, o in zip(ins, outs):
print(f"{i}: ({inc[i]}) -> {o}: ({outc[o]})") |
That's great. Thanks for your help. |
Hi,
If we apply a stride 2 convolution on a sparse tensor x to get a new sparse tenseor y, than the number of coords of y should be less than x, how can we get the current index of coords of x, such that x.coords[index] == y.coords?
Thanks a lot!
The text was updated successfully, but these errors were encountered: