tinker.types.CustomLossNode
Generated from tinker 0.38.0 at commit 4fb85c7. Source links point at that snapshot.
class tinker.types.CustomLossNode(StrictBase)
One node of a traced custom loss, as torch.fx records it.
Fields:
- op (CustomLossNodeOp)
- name (str) – Unique within the graph; later nodes refer to this node by it.
- target (str) – The parameter name (placeholder), the function's qualified name (call_function,
e.g.
torch.exporoperator.mul), the method or attribute name, oroutput. - args (List[Any]) – Encoded arguments; an output node's one argument is what the loss returns.
JSON scalars and strings stand for themselves and lists for lists. Anything else
is a one-key object:
{"ref": name}for a node,{"tuple": [...]},{"dict": {...}},{"slice": [start, stop, step]},{"ellipsis": true},{"float": "inf"}(also"-inf"and"nan"),{"dtype": "float32"},{"device": "cpu"},{"layout": "strided"}or{"memory_format": "contiguous_format"}. - kwargs (Dict[str, Any]) – Encoded keyword arguments, in the same form as
args.