I created a neural network model and would like to customize the loss function.
I was wondering how to return a max value and its neighbors from a tensor?
I know the tf.argmax can return the index of max value from a tensor. But is it possible to get the a new tensor that includes a range of [3 values before max, max, and 3 values after max]