Function¶
- class madspace.Function¶
Bases:
pybind11_objectAn immutable compute graph produced by FunctionBuilder.
A function has named
inputsandoutputs, a list of intermediatelocals, namedglobalsfor trainable or externally supplied tensors, and the ordered list of InstructionCall that computes the outputs from the inputs. Run one with aFunctionRuntime, orsaveit to disk andloadit back.- property globals¶
trainable parameters and external inputs.
- Type:
Named global tensors
- property inputs¶
Named graph inputs.
- property instructions¶
The instruction calls in execution order.
- static load(file: str) madspace._madspace_py.Function¶
Load a function previously written by
save.
- property locals¶
Intermediate values, one per instruction output.
- property outputs¶
Named graph outputs.
- release_inputs()¶
- save(self: madspace._madspace_py.Function, file: str) None¶
Serialize the function to
file.