Add the topological sort for backprop.

This commit is contained in:
laurent
2023-06-20 19:15:39 +01:00
parent 671bcf060e
commit 9ff8d2076a
3 changed files with 58 additions and 1 deletions

View File

@ -131,7 +131,7 @@ mod tests {
#[test]
fn stride() {
let shape = Shape::from(());
assert_eq!(shape.stride_contiguous(), []);
assert_eq!(shape.stride_contiguous(), Vec::<usize>::new());
let shape = Shape::from(42);
assert_eq!(shape.stride_contiguous(), [1]);
let shape = Shape::from((42, 1337));