title: TypeError: float() argument must be a string or a number, not 'dict_values',
body: <p>I was trying to plot the loss for my model, so coded like below, but I am getting below error:</p>
  
  <blockquote>
    <p>TypeError: float() argument must be a string or a number, not 'dict_values'</p>
  </blockquote>
  
  <p>code:</p>
  
  <pre><code>def fit(self, X, Y, epochs=1, learning_rate=1, initialise=True, display_loss=False):
  
      #initialise w,b
      if initialise:
          self.w = np.random.randn(1,X.shape[1])
          self.b = 0
  
      if display_loss:
          loss = {}
  
      for i in tqdm_notebook(range(epochs), total=epochs, unit='epoch'):
          dw = 0
          db = 0
          for x,y in zip(X,Y,):
              dw += self.grad_w(x,y)
              db += self.grad_b(x,y)
  
          self.w -= learning_rate * dw
          self.b -= learning_rate * db
  
          if display_loss:
              Y_pred = self.sigmoid(self.perceptron(X))
              loss[i] = mean_squared_error(Y_pred, Y)
  
      if display_loss:
          plt.plot(loss.values())
          plt.xlabel('Epochs')
          plt.ylabel('Mean Squared Error')
          plt.show()
  
  def predict(self, X):
      Y_pred = []
      for x in X:
          y_pred = self.sigmoid(self.perceptron(x))
          Y_pred.append(y_pred)
      return np.array(Y_pred)
  
  sn = SigmoidNeuron()
  sn.fit(X_scaled_train, Y_scaled_train, epochs=1000, learning_rate=0.01, display_loss=True)
  </code></pre>