feat: update workspace paths and enhance gitignore

- Updated stablediffusion crate path from "../stable-diffusion-burn" to "./crates/stable-diffusion-burn" for proper workspace resolution
- Enhanced .gitignore to include generated model files (.mpk, .pt, .bin, .safetensors, .ckpt) and user_data directory
- Added Cargo.lock to gitignore with appropriate comment
- Reorganized IDE files section in gitignore for better clarity
- Added newline at end of file for proper formatting
This commit is contained in:
2026-03-05 19:39:14 +01:00
parent 4bb7ca9074
commit 3a67c0979c
1605 changed files with 537032 additions and 2 deletions

View File

@@ -0,0 +1,22 @@
use super::*;
use burn_tensor::TensorData;
use burn_tensor::Tolerance;
#[test]
fn should_diff_recip() {
let data = TensorData::from([2.0, 5.0, 0.4]);
let tensor = TestAutodiffTensor::<1>::from_data(data, &Default::default()).require_grad();
let tensor_out = tensor.clone().recip();
let grads = tensor_out.backward();
let grad = tensor.grad(&grads).unwrap();
tensor_out
.into_data()
.assert_eq(&TensorData::from([0.5, 0.2, 2.5]), false);
grad.to_data().assert_approx_eq::<FloatElem>(
&TensorData::from([-0.25, -0.04, -6.25]),
Tolerance::default(),
);
}