def testInit(self):
    p = pruning.Pruning(self.pruning_hparams)
    self.assertEqual(p._spec.name, 'test')
    self.assertAlmostEqual(p._spec.threshold_decay, 0.9)
    self.assertEqual(p._spec.pruning_frequency, 10)
    self.assertEqual(p._spec.sparsity_function_end_step, 100)
    self.assertAlmostEqual(p._spec.target_sparsity, 0.9)
    self.assertEqual(p._weight_sparsity_map['conv1'], 0.8)
    self.assertEqual(p._weight_sparsity_map['conv2/kernel'], 0.8)
def testInit(self):
    p = pruning.Pruning(self.pruning_hparams)
    self.assertEqual(p._spec.name, 'test')
    self.assertAlmostEqual(p._spec.threshold_decay, 0.9)
    self.assertEqual(p._spec.pruning_frequency, 10)
    self.assertEqual(p._spec.sparsity_function_end_step, 100)
    self.assertAlmostEqual(p._spec.target_sparsity, 0.9)
    self.assertEqual(p._weight_sparsity_map['conv1'], 0.8)
    self.assertEqual(p._weight_sparsity_map['conv2/kernel'], 0.8)