Added example to slice comment
@@ -387,7 +387,9 @@ public class PartialDerivatives {
/*
* This reshape is designed to deal with the case that we've sliced a rank 2 tensor. Due to the way our
* tensor implementation works slicing a rank 2 still gives you a rank two back, whereas obviously the
- * partial will be rank > 2 and thus the new rank will be smaller than we'd want.
+ * partial will be rank > 2 and thus the new rank of the partial will be smaller than we'd want:
+ * eg If I slice a 3x3x3 I end up with a 3x3 and our partials would go from 3x3x3x3x3x3 to 3x3x3x3x3
+ * Whereas a 2x2 after slicing will be 2x1 and our partials would go from 2x2x2x2 to 2x1x2x2
*/
if (reshape) {
slicedPartialDerivative = slicedPartialDerivative.reshape(partialDerivativeShape);
