title: TensorFlow:Failed to convert a NumPy array to a Tensor (Unsupported object type int)
body: <p>I am practicing on this kaggle dataset regarding car price prediction (<a href="https://www.kaggle.com/hellbuoy/car-price-prediction" rel="nofollow noreferrer">https://www.kaggle.com/hellbuoy/car-price-prediction</a>). I dont know why am I receiving this error.</p>
  <pre><code>import numpy as np
  import pandas as pd
  import matplotlib.pyplot as plt
  from tensorflow.keras import layers,models
  
  cars_data=pd.read_csv('/content/CarPrice_Assignment.csv')
  cars_data.head()
  
  cars_data.info()
  
  cars_data.describe()
  
  train_data=cars_data.iloc[:103]
  train_data=train_data.drop('price',axis=1)
  train_data=np.asarray(train_data.values)
  
  train_targets=cars_data.price.iloc[:103]
  train_targets=np.asarray(train_targets)
  
  test_data=cars_data.iloc[103:165]
  test_data=test_data.drop('price',axis=1)
  test_data=np.asarray(test_data.values)
  
  test_targets=cars_data.price.iloc[103:165]
  test_targets=np.asarray(test_targets)
  
  val_data=cars_data.iloc[165:]
  val_data=val_data.drop('price',axis=1)
  val_data=np.asarray(val_data.values)
  
  val_targets=cars_data.price.iloc[165:]
  val_targets=np.asarray(val_targets)
  
  
  model=models.Sequential()
  model.add(layers.Dense(10,activation='relu',input_shape=(25,)))
  model.add(layers.Dense(8,activation='relu'))
  model.add(layers.Dense(6,activation='relu'))
  model.add(layers.Dense(1))
  model.compile(optimizer='rmsprop',loss='mse',metrics=['mae'])
  model.fit(train_data,train_targets,epochs=20,batch_size=1)
  </code></pre>