qualia_codegen_core package
Subpackages
- qualia_codegen_core.assets package
- qualia_codegen_core.examples package
- qualia_codegen_core.graph package
- Subpackages
- Submodules
- qualia_codegen_core.graph.ActivationRange module
- qualia_codegen_core.graph.ActivationsRange module
- qualia_codegen_core.graph.KerasModelGraph module
- qualia_codegen_core.graph.LayerNode module
- qualia_codegen_core.graph.ModelGraph module
- qualia_codegen_core.graph.Quantization module
- qualia_codegen_core.graph.RoundMode module
- qualia_codegen_core.graph.TorchModelGraph module
- Module contents
Submodules
- qualia_codegen_core.Allocator module
- qualia_codegen_core.Converter module
NumberType
Converter
Converter.layer_template_files
Converter.TEMPLATE_PATH
Converter.weights2carray()
Converter.write_layer_function()
Converter.write_layer_header()
Converter.write_layer_weights()
Converter.render_template()
Converter.write_model_header()
Converter.write_model()
Converter.write_numeric_header()
Converter.write_defines_header()
Converter.combine_zeropadding()
Converter.remove_dropout()
Converter.combine_relu()
Converter.remove_identity()
Converter.rename_operators()
Converter.optimize_modelgraph()
Converter.preprocess_modelgraph()
Converter.validate_modelgraph()
Converter.quantize_modelgraph()
Converter.generate_code()
Converter.convert_model()
- qualia_codegen_core.DataConverter module
- qualia_codegen_core.MetricsConverter module
- qualia_codegen_core.Quantizer module
- qualia_codegen_core.Validator module
- qualia_codegen_core.main module
- qualia_codegen_core.typing module
Module contents
- class qualia_codegen_core.Converter(output_path: Path | None = None)[source]
Bases:
object
- layer_template_files: ClassVar[dict[type[TBaseLayer], str | None]] = {<class 'qualia_codegen_core.graph.layers.TActivationLayer.TActivationLayer'>: 'activation', <class 'qualia_codegen_core.graph.layers.TAddLayer.TAddLayer'>: 'add', <class 'qualia_codegen_core.graph.layers.TAvgPooling1DLayer.TAvgPooling1DLayer'>: 'averagepool1d', <class 'qualia_codegen_core.graph.layers.TAvgPooling2DLayer.TAvgPooling2DLayer'>: 'averagepool2d', <class 'qualia_codegen_core.graph.layers.TBatchNormalization1DLayer.TBatchNormalization1DLayer'>: 'batchnorm1d', <class 'qualia_codegen_core.graph.layers.TBatchNormalization2DLayer.TBatchNormalization2DLayer'>: 'batchnorm2d', <class 'qualia_codegen_core.graph.layers.TConcatenateLayer.TConcatenateLayer'>: 'concatenate', <class 'qualia_codegen_core.graph.layers.TConv1DLayer.TConv1DLayer'>: 'conv1d', <class 'qualia_codegen_core.graph.layers.TConv2DLayer.TConv2DLayer'>: 'conv2d', <class 'qualia_codegen_core.graph.layers.TDenseLayer.TDenseLayer'>: 'fc', <class 'qualia_codegen_core.graph.layers.TFlattenLayer.TFlattenLayer'>: 'flatten', <class 'qualia_codegen_core.graph.layers.TInputLayer.TInputLayer'>: None, <class 'qualia_codegen_core.graph.layers.TMaxPooling1DLayer.TMaxPooling1DLayer'>: 'maxpool1d', <class 'qualia_codegen_core.graph.layers.TMaxPooling2DLayer.TMaxPooling2DLayer'>: 'maxpool2d', <class 'qualia_codegen_core.graph.layers.TPermuteLayer.TPermuteLayer'>: 'permute', <class 'qualia_codegen_core.graph.layers.TSampleNormLayer.TSampleNormLayer'>: 'samplenorm', <class 'qualia_codegen_core.graph.layers.TSliceLayer.TSliceLayer'>: 'slice', <class 'qualia_codegen_core.graph.layers.TSumLayer.TSumLayer'>: 'sum'}
- TEMPLATE_PATH = PosixPath('/home/runner/work/qualia-codegen-core/qualia-codegen-core/src/qualia_codegen_core/assets')
- write_model_header(modelgraph: ModelGraph) str [source]
- write_model(modelgraph: ModelGraph, allocation: dict[str, list[list[LayerNode]] | dict[LayerNode, int]] | None) str [source]
- write_defines_header(modelgraph: ModelGraph) str [source]
- combine_zeropadding(modelgraph: ModelGraph) ModelGraph | None [source]
- remove_dropout(modelgraph: ModelGraph) ModelGraph [source]
- combine_relu(modelgraph: ModelGraph) ModelGraph | None [source]
- remove_identity(modelgraph: ModelGraph) ModelGraph [source]
- rename_operators(modelgraph: ModelGraph) ModelGraph [source]
- optimize_modelgraph(modelgraph: ModelGraph) ModelGraph | None [source]
- preprocess_modelgraph(modelgraph: ModelGraph) ModelGraph | None [source]
- validate_modelgraph(modelgraph: ModelGraph) bool [source]
- quantize_modelgraph(modelgraph: ModelGraph) bool [source]
- generate_code(modelgraph: ModelGraph, allocation: dict[str, list[list[LayerNode]] | dict[LayerNode, int]]) str | None [source]
- convert_model(modelgraph: ModelGraph) str | None [source]