(rontolisp) docs
← torch Package Functions

torch:parameter

(torch:parameter x &key element-type)

Returns a leaf tensor with :requires-grad t -- the spelling that marks a value as a trainable parameter of a module. Identical to (torch:tensor x :requires-grad t), single-float data included; the separate name is what makes a module's fields readable at a glance. A field holding a tensor without requires-grad is a buffer instead, and torch:parameters skips it.