pub struct CrossEntropyLoss {
pub loss: Vec<f32>,
pub avg_loss: f32,
}
Expand description
cross entropy loss, as a special nn module
- loss: records of each sample in a forward call
- avg_loss: avg loss of the batch
Fields§
§loss: Vec<f32>
§avg_loss: f32
Implementations§
Auto Trait Implementations§
impl Freeze for CrossEntropyLoss
impl RefUnwindSafe for CrossEntropyLoss
impl Send for CrossEntropyLoss
impl Sync for CrossEntropyLoss
impl Unpin for CrossEntropyLoss
impl UnwindSafe for CrossEntropyLoss
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more