class documentation
class InputConfig(OutputConfig):
Tensor metadata and preprocessing for one model input.
Scalar mean and scale values are expanded to three channels. The named value "imagenet" expands to the standard ImageNet preprocessing vectors. One-channel inputs are normalized to grayscale encoding.
| Instance Variable | encoding |
Source and destination channel ordering. |
| Instance Variable | frozen |
Constant value for an input that is not supplied at run time. |
| Instance Variable | mean |
Per-channel value subtracted during preprocessing. |
| Instance Variable | scale |
Per-channel divisor applied during preprocessing. |
| Property | encoding |
Undocumented |
| Property | is |
Undocumented |
| Class Method | _validate |
Undocumented |
| Static Method | _parse |
Parses the mean_values from the config. |
| Static Method | _parse |
Parses the scale_values from the config. |
| Static Method | _parse |
Resolves named values from the config. |
| Method | _validate |
Undocumented |
| Method | _validate |
Undocumented |
Inherited from OutputConfig:
| Method | validate |
Undocumented |
| Instance Variable | data |
Tensor element type. |
| Instance Variable | layout |
Dimension labels such as "NCHW". A default is inferred from shape when omitted. |
| Instance Variable | name |
Tensor name in the source model. |
| Instance Variable | shape |
Tensor dimensions. May be omitted when they can be inferred. |
| Class Method | _make |
Undocumented |
Inherited from CustomBaseModel (via OutputConfig):
| Class Variable | model |
Undocumented |
@model_validator( mode='before')
@classmethod
def _validate_encoding(cls, data: @classmethod
dict[ str, Any]) -> dict[ str, Any]:
¶
Undocumented
@field_validator( 'mean_values', mode='before')
@staticmethod
def _parse_mean_values(value: @staticmethod
Any) -> Any:
¶
Parses the mean_values from the config.
@field_validator( 'scale_values', mode='before')
@staticmethod
def _parse_scale_values(value: @staticmethod
Any) -> Any:
¶
Parses the scale_values from the config.