fix layers

This commit is contained in:
wassname
2026-04-10 11:12:45 +08:00
parent 9c317af8eb
commit 60cd056320
3 changed files with 64 additions and 28 deletions
+5
View File
@@ -0,0 +1,5 @@
import torch
x = torch.tensor([1.0, 2.0, 4.0, 7.0])
with torch.no_grad():
dx = torch.gradient(x)[0]
print(dx)