ValueError: Feature (key: age) cannot have rank 0. Given: Tensor("linear/linear_model/Cast:0", shape=(), dtype=float32) code example
Example: ValueError: Feature (key: age) cannot have rank 0. Given: Tensor("linear/linear_model/Cast:0", shape=(), dtype=float32)
'''Feature cannot have rank 0 issue occurs when we dont specify batch_size
with input_fn or eval_fn or predict_fn with estimator api'''
dataset = tf.data.TextLineDataset(data_file)
dataset = dataset.map(parse_csv)
dataset = dataset.batch(10)