title: ValueError: Cannot feed value of shape (891,) for Tensor 'Placeholder_37:0', which has shape '(?, 1)'
body: <pre><code>    import pandas as pd
  import tensorflow as tf
  
  PREDICTORS = ["Pclass", "Sex", "Age", "SibSp", "Parch", "Fare", "Embarked"]
  TARGET = ["Survived"]
  
  def load_file(path):
      data = pd.read_csv(path)
      data["Age"] = data["Age"].fillna(data["Age"].mean())
      data["Sex"] = data["Sex"].apply(lambda sex: 1 if sex == "male" else 0)
  
      data["Embarked"] = data["Embarked"].fillna("S")
  
      data.loc[data["Embarked"] == "S", "Embarked"] = 0
      data.loc[data["Embarked"] == "C", "Embarked"] = 1
      data.loc[data["Embarked"] == "Q", "Embarked"] = 2
  
      data["Fare"] = data["Fare"].fillna(data["Fare"].mean())
  
      return data
  
  train, test = load_file("../input/train.csv"), load_file("../input/test.csv")
  train.head()
  test.head()
  
  train_x_data = train.loc[:, ["Pclass", "Sex", "Age", "SibSp", "Parch", "Fare", "Embarked"]]
  print(train_x_data.head())
  
  test_x_data = test.loc[:, ["Pclass", "Sex", "Age", "SibSp", "Parch", "Fare", "Embarked"]]
  print(test_x_data.head())
  
  train_y_data = train.loc[:, "Survived"]
  print(train_y_data.head())
  
  X = tf.placeholder(tf.float32, shape=[None, 7])
  Y = tf.placeholder(tf.float32, shape=[None, 1])
  
  W = tf.Variable(tf.random_normal([7, 1]), name='weight')
  b = tf.Variable(tf.random_normal([1]), name='bias')
  
  hypothesis = tf.matmul(X, W) + b
  
  cost = tf.reduce_mean(tf.square(hypothesis - Y))
  
  optimizer = tf.train.GradientDescentOptimizer(learning_rate=1e-5)
  train = optimizer.minimize(cost)
  
  sess = tf.Session()
  sess.run(tf.global_variables_initializer())
  
  for step in range(2001):
      sess.run(train, feed_dict={X:train_x_data, Y:train_y_data})
  </code></pre>
  
  <p>hello guys
  I'm a beginner in kaggle</p>
  
  <p>And trying 'titanic tutorial' in this site (<a href="https://www.kaggle.com/c/titanic" rel="nofollow noreferrer">https://www.kaggle.com/c/titanic</a>)</p>
  
  <p>My problem is the last code of the source (sess.run(train, feed_dict={X:train_x_data, Y:train_y_data})) &lt;- this part!</p>
  
  <p>Computer error says I have problem in feed_dict on using shape
  I have used [None, 7] shape I you can see in the source and I don't get the problem.</p>
  
  <p>Can someone help me solve the problem??</p>