package torch

  1. Overview
  2. Docs

Module Torch.Var_storeSource

Sourcetype t

A VarStore is used to store all the variables used by a given model. The model creates variables by calling Var_store.new_var for which it has to provide a name. Var_store.sub creates a sub-directory in the var store which is useful to group some variables together.

Sourceval create : ?frozen:bool -> ?device:Device.t -> name:string -> unit -> t
Sourceval sub : t -> string -> t
Sourceval (/) : t -> string -> t
Sourceval trainable_vars : t -> Tensor.t list
Sourceval all_vars : t -> (string * Tensor.t) list
Sourceval name : t -> string
Sourceval device : t -> Device.t
Sourcemodule Init : sig ... end
Sourceval new_var : ?trainable:bool -> t -> shape:int list -> init:Init.t -> name:string -> Tensor.t
Sourceval new_var_copy : ?trainable:bool -> t -> src:Tensor.t -> name:string -> Tensor.t
Sourceval freeze : t -> unit
Sourceval unfreeze : t -> unit
Sourceval copy : src:t -> dst:t -> unit