[nnpkg_tools] remove debug print and unnecessary line (#8937)
author이상규/On-Device Lab(SR)/Principal Engineer/삼성전자 <sg5.lee@samsung.com>
Thu, 14 Nov 2019 06:36:43 +0000 (15:36 +0900)
committer이춘석/On-Device Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com>
Thu, 14 Nov 2019 06:36:43 +0000 (15:36 +0900)
- fuse_instance_norm.js
  : remove all console.debug statement to suppress output
- gen_golden.py
  : remove dead code

Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
tools/nnpackage_tool/gen_golden/gen_golden.py
tools/nnpackage_tool/tflite2circle/fuse_instance_norm.js

index d79fddc..1793ed0 100755 (executable)
@@ -20,7 +20,6 @@ if __name__ == '__main__':
         '-o', '--output', action='store', dest="out_dir", help="output directory")
     args = parser.parse_args()
 
-    filename = sys.argv[1]
     filename = args.graph_def
 
     if args.out_dir:
index e9ea417..3ea29b5 100644 (file)
@@ -19,7 +19,6 @@ let opcodeIdxToOpName = []
 for (const opcode of model.operator_codes) {
   opcodeIdxToOpName.push(opcode.builtin_code)
 }
-console.debug(opcodeIdxToOpName)
 
 // List: tensor index (number) => producing operator's index (number)
 // assume there is only one op that produces given output tensor.
@@ -78,7 +77,6 @@ for (let i = 0; i < operators.length; ++i) {
   if (opeq(operators[i], "SQUARED_DIFFERENCE"))
     squaredDifferenceIdxList.push(i)
 }
-console.debug(squaredDifferenceIdxList)
 
 let instanceNormList = [ ]
 for (let idx of squaredDifferenceIdxList) {
@@ -134,7 +132,6 @@ for (let idx of squaredDifferenceIdxList) {
   }
   const epsilon = getFloatScalarValueFromInputsOf(add3)
   if (hasUndefined(epsilon)) continue
-  console.debug(epsilon)
 
   const rsqrt4 = findConsumer(add3, "RSQRT")
   if (hasUndefined(rsqrt4)) continue
@@ -151,7 +148,6 @@ for (let idx of squaredDifferenceIdxList) {
   }
   const iGamma = getFloat1DTensorIdxFromInputsOf(mul5)
   if (hasUndefined(iGamma)) continue
-  console.debug(iGamma)
 
   let mul6, mul7
   for (let i of useOps[mul5.outputs[0]]) {