aimet_tensorflow.layer_output_utils¶
- class aimet_tensorflow.keras.layer_output_utils.LayerOutputUtil(model, save_dir='./KerasLayerOutput')[source]¶
Implementation to capture and save outputs of intermediate layers of a model (fp32/quantsim)
Constructor for LayerOutputUtil.
- Parameters:
model (
Model
) – Keras (fp32/quantsim) model.save_dir (
str
) – Directory to save the layer outputs.
The following API can be used to Generate Layer Outputs
- LayerOutputUtil.generate_layer_outputs(input_instance)[source]¶
This method captures output of every layer of a model & saves the inputs and corresponding layer-outputs to disk.
- Parameters:
input_instance (
Union
[Tensor
,List
[Tensor
],Tuple
[Tensor
]]) – Single input instance for which layer output need to be generated- Returns:
None