package
0.9.1
Repository: https://github.com/sugarme/gotch.git
Documentation: pkg.go.dev

# Functions

Decode decodes pickled data created by 'torch.save()' with Python Pytorch and rebuilds named tensor weights.
Encode encodes model using pickling machinery.
Converts the bits representation of a Half Float (16 bits) number to an IEEE 754 float representation (32 bits) From http://www.fox-toolkit.org/ftp/fasthalffloatconversion.pdf.
No description provided by the author
Load unpickles a pickled file.
LoadAll finds and loads all weights from varstore.
LoadInfo loads pretrained weights and prints out name and shape of weights.
LoadPartial finds and loads weights for varstore.
Loads unpicles a string.
LoadWithUnpickler is like Load, but it accepts a newUnpickler function which is used to create new customized pickle.Unpickler instances.
No description provided by the author
No description provided by the author
NewDict makes and returns a new empty Dict.
NewFrozenSetFromSlice makes and returns a new FrozenSet initialized with the elements of the given slice.
No description provided by the author
No description provided by the author
NewList makes and returns a new empty List.
NewListFromSlice makes and returns a new List initialized with the elements of the given slice.
No description provided by the author
NewOrderedDict makes and returns a new empty OrderedDict.
NewSet makes and returns a new empty Set.
NewSetFromSlice makes and returns a new Set initialized with the elements of the given slice.
No description provided by the author
NewUnpickler creates a new Unpickler.

# Constants

The highest protocol number pickle currently knows how to read.

# Variables

modify set by adding topmost stack items.
append stack top to list below it.
extend list on stack by topmost stack slice.
push bytes; counted binary string argument.
push very long bytes string.
push float; arg is 8-byte float encoding.
" " " " " " ; " " 1-byte arg.
push four-byte signed int.
push 1-byte unsigned int.
push 2-byte unsigned int.
" " " ; " " " " stack.
" " " " " ; " " 1-byte arg.
push string; counted binary string argument.
" " " ; counted UTF-8 string argument.
push very long string.
call __setstate__ or __dict__.update().
push bytearray.
The protocol pickle currently used to write by default.
build a dict from stack items.
duplicate top stack item.
push empty dict.
push empty list.
push empty set on the stack.
push empty tuple.
No description provided by the author
No description provided by the author
push object from extension registry; 1-byte index.
ditto, but 2-byte index.
ditto, but 4-byte index.
push float object; decimal string argument.
indicate the beginning of a new frame.
build frozenset from topmost stack items.
push item from memo on stack; index is string arg.
push self.find_class(modname, name); 2 string args.
build & push class instance.
push integer or bool; decimal string argument.
build list from topmost stack items.
push long; decimal string argument.
push item from memo on stack; index is 4-byte arg.
" " " " " ; " " 4-byte arg.
push long from < 256 bytes.
push really big long.
push special markobject on stack.
store top of the stack in memo.
push False.
build object by applying cls.__new__ to argtuple.
like NEWOBJ but work with keyword only arguments.
push True.
push next out-of-band buffer.
push None.
build & push class instance.
push persistent object; id is taken from string arg.
discard topmost stack item.
discard stack top through topmost markobject.
identify pickle protocol.
store stack top in memo; index is string arg.
make top of stack readonly.
apply callable to argtuple, both on stack.
add key+value pair to dict.
modify dict by adding topmost key+value pairs.
" " ; " " " " < 256 bytes.
" " ; " " " " < 256 bytes.
push short string; UTF-8 length < 256 bytes.
same as GLOBAL but using names on the stacks.
every pickle ends with STOP.
push string; NL-terminated string argument.
build tuple from topmost stack items.
build 1-tuple from stack top.
build 2-tuple from two topmost stack items.
build 3-tuple from three topmost stack items.
push Unicode string; raw-unicode-escaped'd argument.

# Structs

BaseStorage represents a base storage.
No description provided by the author
BFloat16Storage: ================.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
OrderedDict is a minimal and trivial implementation of an ordered map, which represent a Python "collections.OrderedDict" object.
OrderedDictClass represent Python "collections.OrderedDict" class.
OrderedDictEntry is a single key/value pair stored in an OrderedDict.
Rebuild Device Tensor From Numpy: ================================= Ref.
Rebuild Meta Tensor No Storage: =============================== Ref.
Rebuild Parameter: ================== RebuildTensor represents a struct to rebuild tensor back from pickle object.
Rebuild QTensor: ================ Ref.
Rebuild Sparse CSR Tensor: ========================== Ref.
Rebuild Sparse Tensor: ======================= ref.
No description provided by the author
RebuildTensorV2 represents a struct to rebuild tensor back from pickle object.
No description provided by the author
No description provided by the author
No description provided by the author
Stop implements error interface.
StorageTensor: ===============.
No description provided by the author

# Interfaces

Callable is implemented by any value that can be directly called to get a new value.
DictSetter is implemented by any value that exhibits a dict-like behaviour, allowing arbitrary key/value pairs to be set.
ListAppender is implemented by any value that exhibits a list-like behaviour, allowing arbitrary values to be appended.
PyAttrSettable is implemented by any value on which an existing or new Python-like attribute can be set.
PyDictSettable is implemented by any value that can store dictionary-like key/value pairs.
PyNewable is implemented by any value that has a Python-like "__new__" method.
PyStateSettable is implemented by any value that has a Python-like "__setstate__" method.
SetAdder is implemented by any value that exhibits a set-like behaviour, allowing arbitrary values to be added.
Storage define Storage interface.
StorageClass defines interface for types to be used in Storage.

# Type aliases

ByteArray simulates Python bytearray.
Dict represents a Python "dict" (builtin type).
FrozenSet represents a Python "frozenset" (builtin type).
List represents a Python "list" (builtin type).
Set represents a Python "set" (builtin type).
No description provided by the author