diff options
author | zachcp <zachcp@users.noreply.github.com> | 2024-11-18 22:07:07 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-19 04:07:07 +0100 |
commit | 3159f91b90a5bc68b275f8688472ba8917a834da (patch) | |
tree | 13a115866aab8f3126b7ce0aa93d4d9392ecaf74 /candle-core/src/lib.rs | |
parent | 1a0f9ccf16de9fc311b000a61e8e9e357a15855b (diff) | |
download | candle-3159f91b90a5bc68b275f8688472ba8917a834da.tar.gz candle-3159f91b90a5bc68b275f8688472ba8917a834da.tar.bz2 candle-3159f91b90a5bc68b275f8688472ba8917a834da.zip |
20241118 docs (#2629)
* module docs
* varbuilder gguf docs
* add a link to gguf files
* small additonal mod doc titles
* safetensor docs
* more core docs
* more module docs in canlde_core
* 2 more link fixes
Diffstat (limited to 'candle-core/src/lib.rs')
-rw-r--r-- | candle-core/src/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/candle-core/src/lib.rs b/candle-core/src/lib.rs index 4b73d006..5f9a1c97 100644 --- a/candle-core/src/lib.rs +++ b/candle-core/src/lib.rs @@ -7,8 +7,8 @@ //! //! let a = Tensor::arange(0f32, 6f32, &Device::Cpu)?.reshape((2, 3))?; //! let b = Tensor::arange(0f32, 12f32, &Device::Cpu)?.reshape((3, 4))?; -//! //! let c = a.matmul(&b)?; +//! //! # Ok(())} //! ``` //! @@ -140,7 +140,7 @@ impl ToUsize2 for (usize, usize) { } } -// A simple trait defining a module with forward method using a single argument. +/// Defining a module with forward method using a single argument. pub trait Module { fn forward(&self, xs: &Tensor) -> Result<Tensor>; } @@ -160,8 +160,8 @@ impl<M: Module> Module for Option<&M> { } } -// A trait defining a module with forward method using a single tensor argument and a flag to -// separate the training and evaluation behaviors. +/// A single forward method using a single single tensor argument and a flag to +/// separate the training and evaluation behaviors. pub trait ModuleT { fn forward_t(&self, xs: &Tensor, train: bool) -> Result<Tensor>; } |