I am new to Tensorflow and machine learning.
I am trying to use high level API from Tensorflow.
Please tell me what i am doing wrong.
import tensorflow as tf
import numpy as np
features = np.array([[-1,-2],[1,2]],dtype='int32')
label = np.array([0,1],dtype='int32')
feature_columns = [tf.feature_column.numeric_column('features',shape=[2,2])]
model = tf.estimator.LinearClassifier(feature_columns=feature_columns,n_classes=2)
model.train(input_fn= tf.estimator.inputs.numpy_input_fn(x=features,y=label,shuffle=True))
I am getting an error
ValueError: features should be a dictionary of `Tensor`s. Given type: <class 'tensorflow.python.framework.ops.Tensor'>