title: ValueError: shapes (56,1) and (56,2) not aligned: 1 (dim 1) != 56 (dim 0)
body: <p>I got a value error when trying to run the 'train' function as follows. How do I resolve the problem with the dot product?</p>
  
  <pre><code>def train(self, inputs_list, targets_list):
          # Convert inputs list to 2d array
          inputs = np.array(inputs_list, ndmin=2).T
          targets = np.array(targets_list, ndmin=2).T
  
          #### Implement the forward pass here ####
          ### Forward pass ###
          # TODO: Hidden layer
          hidden_inputs = np.dot(inputs,self.weights_input_to_hidden.T)
          # signals into hidden layer
          hidden_outputs = self.sigmoid(hidden_inputs)
          # signals from hidden layer
          print(hidden_outputs)
  
          # TODO: Output layer
          final_inputs = np.dot(hidden_outputs,self.weights_hidden_to_output)
          # signals into final output layer
          final_outputs = final_inputs
          # signals from final output layer
  
          #### Implement the backward pass here ####
          ### Backward pass ###
  
          # TODO: Output error
          output_errors = final_outputs - targets_list
          # Output layer error is the difference between desired target and actual output.
  
          # TODO: Backpropagated error
          hidden_errors = np.dot(output_errors,self.weights_hidden_to_output)
          # errors propagated to the hidden layer
          hidden_grad = hidden_outputs * (1 - hidden_outputs)
          # hidden layer gradients
  
          # TODO: Update the weights
          self.weights_hidden_to_output += self.lr * output_errors * hidden_outputs
          # update hidden-to-output weights with gradient descent step
          self.weights_input_to_hidden += self.lr * hidden_errors * hidden_grad * inputs
          # update input-to-hidden weights with gradient descent step
  
  
  &lt;ipython-input-21-c3bea2c48af8&gt; in train(self, inputs_list, targets_list)
       31         ### Forward pass ###
       32         # TODO: Hidden layer
  ---&gt; 33         hidden_inputs = np.dot(inputs,self.weights_input_to_hidden.T)
       34         # signals into hidden layer
       35         hidden_outputs = self.sigmoid(hidden_inputs)
  
  ValueError: shapes (56,1) and (56,2) not aligned: 1 (dim 1) != 56 (dim 0)
  </code></pre>