Files
rustytorch/crates/models/rtx-vision/tests/augmentation_fixes_test.rs
T
2026-03-04 00:08:42 +00:00

27 lines
750 B
Rust

//! TDD tests for augmentation fixes
//! These tests define expected behavior for augmentation operations
use rtx_tensor::{Device, Tensor};
#[test]
fn test_randn_with_shape_slice() {
// Tensor::randn expects &[usize], not Vec<usize>
let device = Device::cpu();
let shape = vec![2, 3, 4];
// Should pass &shape, not shape itself
let tensor = Tensor::randn(&shape, &device).unwrap();
assert_eq!(tensor.shape().dims(), &[2, 3, 4]);
}
#[test]
fn test_tensor_device_reference() {
// device() method should return a reference
let device = Device::cpu();
let tensor = Tensor::zeros(&[2, 3], &device).unwrap();
// tensor.device() should return &Device
let _device_ref = &tensor.device();
assert!(true);
}