Provides custom validation data for benchmarking.
Nested Class Summary
interface | CustomValidationConfig.AccuracyValidator | Defines custom accuracy validation rule. | |
class | CustomValidationConfig.Builder | Builder class. |
Inherited Constant Summary
Field Summary
public static final CustomValidationConfig.AccuracyValidator | BYTE_MATCHING_VALIDATOR | Validates model outputs byte-by-byte. |
public static final AccelerationConfig | DEFAULT_GOLDEN_CONFIG | Default config used to calculate golden output when golden is not provided. |
public static final CustomValidationConfig.AccuracyValidator | SKIP_VALIDATION | No-op validator to skip accuracy validation. |
Public Method Summary
CustomValidationConfig.AccuracyValidator |
accuracyValidator()
Gets accuracy validator value.
|
int |
batchSize()
Gets batch size value.
|
AccelerationConfig |
goldenConfig()
Gets golden config value.
|
Object[] |
goldenInputs()
Gets golden inputs value.
|
ByteBuffer[] |
goldenOutputs()
Gets golden outputs value.
|
Inherited Method Summary
Fields
public static final CustomValidationConfig.AccuracyValidator BYTE_MATCHING_VALIDATOR
Validates model outputs byte-by-byte. Output tensors are compared using
ByteBuffer.equals(Object)
function. This validator will return false
if either golden output or
benchmark output is null
, or their dimensions do not match.
public static final AccelerationConfig DEFAULT_GOLDEN_CONFIG
Default config used to calculate golden output when golden is not provided.
public static final CustomValidationConfig.AccuracyValidator SKIP_VALIDATION
No-op validator to skip accuracy validation.
Public Methods
public CustomValidationConfig.AccuracyValidator accuracyValidator ()
Gets accuracy validator value.
public int batchSize ()
Gets batch size value.
public AccelerationConfig goldenConfig ()
Gets golden config value.
public Object[] goldenInputs ()
Gets golden inputs value.
public ByteBuffer[] goldenOutputs ()
Gets golden outputs value.