qualia_codegen_core.Validator module
- class qualia_codegen_core.Validator.TBaseLayerWithActivation(input_shape: qualia_codegen_core.typing.Shapes, output_shape: qualia_codegen_core.typing.Shapes, output_dtype: qualia_codegen_core.typing.DTypes, name: str, activation: 'TActivation')[source]
Bases:
TBaseLayer
- activation: TActivation
- class qualia_codegen_core.Validator.Validator[source]
Bases:
object
Class used to validate various parts of the model to make sure they conform to the limitation of the conversion tool.
- validate_combined_activation(layer: TBaseLayer) bool [source]
- validate_round_mode(node: LayerNode) bool [source]
Check if layer activation round mode is not None when number_type is int.
- Parameters:
node – LayerNode to check the activation round mode of
- Returns:
True
if layer’s round mode is neither None norqualia_codegen_core.graph.RoundMode.RoundMode.NONE
when layer’s number_type is int, otherwiseFalse
- validate_permute(node: LayerNode) bool [source]
Check that the batch dimension (index 0) is not permuted with the permute operation.
- Parameters:
node – LayerNode with a
qualia_codegen_core.graph.layers.TPermuteLayer
layer
- Returns:
False
if the batch dimension is permuted in aqualia_codegen_core.graph.layers.TPermuteLayer
, otherwiseTrue