Saveable

Trait Saveable 

Source
pub trait Saveable {
    // Required methods
    fn save_binary(&self) -> SerializationResult<Vec<u8>>;
    fn type_id(&self) -> &'static str;

    // Provided methods
    fn version(&self) -> String { ... }
    fn metadata(&self) -> HashMap<String, String> { ... }
}
Expand description

Core trait for objects that can be saved 保存可能オブジェクトのコアトレイト

Required Methods§

Source

fn save_binary(&self) -> SerializationResult<Vec<u8>>

Save object to binary format オブジェクトをバイナリ形式で保存

Source

fn type_id(&self) -> &'static str

Get object type identifier オブジェクトタイプ識別子を取得

Provided Methods§

Source

fn version(&self) -> String

Get version information バージョン情報を取得

Source

fn metadata(&self) -> HashMap<String, String>

Get metadata for object オブジェクトのメタデータを取得

Implementors§

Source§

impl<T> Saveable for Linear<T>
where T: Float + Debug + Default + FromPrimitive + ToPrimitive + Zero + One + 'static + Send + Sync + Copy + ScalarOperand + Sum + Display,

Source§

impl<T: Float + 'static> Saveable for Tensor<T>

Tensor serialization utilities テンソルシリアライゼーションユーティリティ

Source§

impl<T: Float + 'static> Saveable for ModelCheckpoint<T>

Source§

impl<T: Float + 'static> Saveable for StateDict<T>

Source§

impl<T: Float + Send + Sync + 'static + Debug + ScalarOperand + FromPrimitive> Saveable for ReLU<T>

Source§

impl<T: Float + Send + Sync + 'static + ScalarOperand + FromPrimitive> Saveable for Variable<T>

Source§

impl<T: Float + Send + Sync + 'static + ScalarOperand + FromPrimitive> Saveable for ScriptModule<T>