def METHOD_NAME(self):
    indices = tf.constant([[0, 0], [0, 2], [1, 0], [1, 1]], dtype=tf.int64)
    values = tf.constant([0.4, 0.6, 0.8, 0.5])
    shape = tf.constant([2, 3], dtype=tf.int64)
    model = linear.LinearModel()
    inp = tf.SparseTensor(indices, values, shape)
    output = model(inp)
    self.evaluate(tf.compat.v1.global_variables_initializer())
    if tf.executing_eagerly():
        weights = model.get_weights()
        weights[0] = np.ones((3, 1))
        model.set_weights(weights)
        output = model(inp)
        self.assertAllClose([[1.0], [1.3]], self.evaluate(output))