Skip to main content

Python class

ScaleOrigin

ScaleOrigin

class max.nn.ScaleOrigin(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

source

Bases: Enum

Specifies whether the quantization scale is determined statically or dynamically.

DYNAMIC

DYNAMIC = 'dynamic'

source

Scales are computed at runtime based on the input data.

STATIC

STATIC = 'static'

source

Scales are pre-computed and loaded with the model weights.

is_dynamic

property is_dynamic: bool

source

Whether the scale origin is dynamic.

is_static

property is_static: bool

source

Whether the scale origin is static.