elasticai.creator.nn.fixed_point.linear.testbench
#
Module Contents#
Classes#
API#
- class elasticai.creator.nn.fixed_point.linear.testbench.LinearDesignProtocol[source]#
Bases:
typing.Protocol
- abstract property name: str#
- abstract property port: elasticai.creator.vhdl.design.ports.Port#
- abstract property in_feature_num: int#
- abstract property out_feature_num: int#
- abstract property frac_width: int#
- abstract property data_width: int#
- class elasticai.creator.nn.fixed_point.linear.testbench.LinearTestbench(name: str, uut: elasticai.creator.nn.fixed_point.linear.testbench.LinearDesignProtocol)[source]#
Bases:
elasticai.creator.vhdl.simulated_layer.Testbench
Initialization
- save_to(destination: elasticai.creator.file_generation.savable.Path)[source]#
- property name: str#
- parse_reported_content(content: list[str]) list[list[list[float]]] [source]#
This function parses the reported content, which is just a list of strings. All lines starting with ‘output_text:’ are considered as a result of the testbench. These results will be stacked for each batch. So you get a list[list[list[float]]] which is similar to batch[out channels[output neurons[float]]]. For linear layer the output neurons is 1. For each item reported it is checked if the string starts with ‘result: ‘. If so the remaining part will be split by ‘,’. The first number gives the batch. The second the result.