예제 #1
0
 def testModelHasExpectedNumberOfParameters(self):
   batch_size = 5
   height, width = 299, 299
   inputs = random_ops.random_uniform((batch_size, height, width, 3))
   with arg_scope(inception_v3.inception_v3_arg_scope()):
     inception_v3.inception_v3_base(inputs)
   total_params, _ = model_analyzer.analyze_vars(
       variables_lib.get_model_variables())
   self.assertAlmostEqual(21802784, total_params)
예제 #2
0
 def testModelHasExpectedNumberOfParameters(self):
     batch_size = 5
     height, width = 224, 224
     inputs = random_ops.random_uniform((batch_size, height, width, 3))
     with arg_scope(inception_v2.inception_v2_arg_scope()):
         inception_v2.inception_v2_base(inputs)
     total_params, _ = model_analyzer.analyze_vars(
         variables_lib.get_model_variables())
     self.assertAlmostEqual(10173112, total_params)