-
Notifications
You must be signed in to change notification settings - Fork 36
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
There is no support for tf.strided_slice #28
Comments
Although I don't have time to look into this right now ... Challenge accepted ;) |
I had to implement a very simple strided_slice implementation class StridedSlice(td.Operation):
@staticmethod
def func(input_, begins, ends, strides):
output = input_.copy()
for dim, (begin, end, stride) in enumerate(zip(begins,
ends,
strides)):
if dim >= len(input_.shape):
raise ValueError("Dimension mismatch")
end = end if end else None
output = output[begin:end:stride].T
return output, It is sufficient for a "simple" strided slice, without new dimension add via It is certainly not the best implementation, but it could be useful? |
@celliern: your implementation did not work for me, but this did for simple slices...
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, there's no support for tf.strided_slice() so if somewhere in your graph you have x[:,:,:,None] the graph won't execute. It's a complicated function, so it won't be easy to implement.
The text was updated successfully, but these errors were encountered: