def testCreateMask2D(self):
    width = 10
    height = 20
    with self.cached_session():
        weights = variables.VariableV1(random_ops.random_normal([width, height], stddev=1), name='weights')
        masked_weights = pruning.apply_mask(weights, variable_scope.get_variable_scope())
        variables.global_variables_initializer().run()
        weights_val = weights.eval()
        masked_weights_val = masked_weights.eval()
        self.assertAllEqual(weights_val, masked_weights_val)
def testCreateMask2D(self):
    width = 10
    height = 20
    with self.cached_session():
        weights = variables.VariableV1(random_ops.random_normal([width, height], stddev=1), name='weights')
        masked_weights = pruning.apply_mask(weights, variable_scope.get_variable_scope())
        variables.global_variables_initializer().run()
        weights_val = weights.eval()
        masked_weights_val = masked_weights.eval()
        self.assertAllEqual(weights_val, masked_weights_val)