pub trait TransformOps {
Show 18 methods
// Required methods
fn apply<F>(&self, op: F) -> Self
where F: Fn(f32) -> f32;
fn apply_assign<F>(&mut self, op: F)
where F: Fn(f32) -> f32;
fn elementwise_op<F>(&self, other: &Self, op: F) -> Self
where F: Fn(f32, f32) -> f32;
fn scalar_op<F>(&self, scalar: f32, op: F) -> Self
where F: Fn(f32, f32) -> f32;
fn elementwise_op_assign<F>(&mut self, other: &Self, op: F)
where F: Fn(f32, f32) -> f32;
fn scalar_op_assign<F>(&mut self, scalar: f32, op: F)
where F: Fn(f32, f32) -> f32;
fn sum_dim(&self, dims: &[bool]) -> Self;
fn reshape(&mut self, new_shape: Vec<usize>);
fn permute(&mut self, dims: &[usize]);
fn transpose(&self) -> Self;
fn flatten(&mut self);
fn squeeze(&mut self);
fn unsqueeze(&mut self, dim: usize);
fn broadcast(&self, new_shape: &[usize]) -> Self;
fn compute_broadcast_shape(&self, target_shape: &[usize]) -> Vec<usize>;
fn compute_broadcast_strides(&self, broadcast_shape: &[usize]) -> Vec<usize>;
fn pad_shape(&self, target_rank: usize) -> Vec<usize>;
fn broadcast_tensors(a: &Self, b: &Self) -> (Self, Self)
where Self: Sized;
}Required Methods§
fn apply<F>(&self, op: F) -> Self
fn apply_assign<F>(&mut self, op: F)
fn elementwise_op<F>(&self, other: &Self, op: F) -> Self
fn scalar_op<F>(&self, scalar: f32, op: F) -> Self
fn elementwise_op_assign<F>(&mut self, other: &Self, op: F)
fn scalar_op_assign<F>(&mut self, scalar: f32, op: F)
fn sum_dim(&self, dims: &[bool]) -> Self
fn reshape(&mut self, new_shape: Vec<usize>)
fn permute(&mut self, dims: &[usize])
fn transpose(&self) -> Self
fn flatten(&mut self)
fn squeeze(&mut self)
fn unsqueeze(&mut self, dim: usize)
fn broadcast(&self, new_shape: &[usize]) -> Self
fn compute_broadcast_shape(&self, target_shape: &[usize]) -> Vec<usize>
fn compute_broadcast_strides(&self, broadcast_shape: &[usize]) -> Vec<usize>
fn pad_shape(&self, target_rank: usize) -> Vec<usize>
fn broadcast_tensors(a: &Self, b: &Self) -> (Self, Self)where
Self: Sized,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.