]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - jacinto-ai/pytorch-jacinto-ai-devkit.git/blobdiff - modules/pytorch_jacinto_ai/vision/models/pixel2pixel/pixel2pixelnet_utils.py
updated quantization modules to support mmdetection, using Hardtanh for fixed range...
[jacinto-ai/pytorch-jacinto-ai-devkit.git] / modules / pytorch_jacinto_ai / vision / models / pixel2pixel / pixel2pixelnet_utils.py
index 3073552365211a63424e89cae2d81e28a8701f57..dce04718d023ccbe968ee2ea06f48292a4d1af29 100644 (file)
@@ -9,7 +9,9 @@ def add_lite_prediction_modules(self, model_config, current_channels, module_nam
         UpsampleClass = xnn.layers.UpsampleWith
 
         # can control the range of final output with output_range
-        final_activation = xnn.layers.get_fixed_pact2(output_range=model_config.output_range) if (model_config.output_range is not None) else False
+        output_range = model_config.output_range
+        final_activation = xnn.layers.get_fixed_hardtanh_type(output_range[0],output_range[1]) \
+            if (output_range is not None) else False
         upstride2 = model_config.shortcut_strides[0]
 
         if self.model_config.final_upsample and self.model_config.interpolation_type in ('deconv','upsample_conv','subpixel_conv'):