# tinker.types.CustomLossNode *Generated from tinker 0.38.0 at commit [`4fb85c7`](https://github.com/thinking-machines-lab/tinker/tree/4fb85c7a2be46300f340cedd16ef2fab881c0c38). Source links point at that snapshot.* ## *class* [**tinker.types.CustomLossNode**](https://github.com/thinking-machines-lab/tinker/blob/4fb85c7a2be46300f340cedd16ef2fab881c0c38/src/tinker/types/custom_loss_graph.py#L16)(*[StrictBase](https://github.com/thinking-machines-lab/tinker/blob/4fb85c7a2be46300f340cedd16ef2fab881c0c38/src/tinker/_models.py#L76)*) One node of a traced custom loss, as torch.fx records it. **Fields:** - [**op**](https://github.com/thinking-machines-lab/tinker/blob/4fb85c7a2be46300f340cedd16ef2fab881c0c38/src/tinker/types/custom_loss_graph.py#L19) (*[CustomLossNodeOp](https://github.com/thinking-machines-lab/tinker/blob/4fb85c7a2be46300f340cedd16ef2fab881c0c38/src/tinker/types/custom_loss_graph.py#L11)*) - [**name**](https://github.com/thinking-machines-lab/tinker/blob/4fb85c7a2be46300f340cedd16ef2fab881c0c38/src/tinker/types/custom_loss_graph.py#L21) (*str*) – Unique within the graph; later nodes refer to this node by it. - [**target**](https://github.com/thinking-machines-lab/tinker/blob/4fb85c7a2be46300f340cedd16ef2fab881c0c38/src/tinker/types/custom_loss_graph.py#L24) (*str*) – The parameter name (placeholder), the function's qualified name (call_function, e.g. `torch.exp` or `operator.mul`), the method or attribute name, or `output`. - [**args**](https://github.com/thinking-machines-lab/tinker/blob/4fb85c7a2be46300f340cedd16ef2fab881c0c38/src/tinker/types/custom_loss_graph.py#L28) (*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**](https://github.com/thinking-machines-lab/tinker/blob/4fb85c7a2be46300f340cedd16ef2fab881c0c38/src/tinker/types/custom_loss_graph.py#L37) (*Dict[str, Any]*) – Encoded keyword arguments, in the same form as `args`. ## Referenced by - [tinker.types.CustomLossGraph](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/customlossgraph/index.md)