Guest User

Untitled

a guest
Nov 13th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. class NeuralNetwork(object):
  2.  
  3. ...
  4.  
  5. def predict(self, x):
  6. layer1 = sigmoid(np.dot(x, self.weights1))
  7. output = sigmoid(np.dot(layer1, self.weights2))
  8. return output
  9.  
  10. x_seen = np.array([1, 1, 0])
  11. print(nn.predict(x_seen))
  12. # [0.01162975]
  13.  
  14. x_unseen = np.array()
  15. print(nn.predict(x_unseen))
  16. # [0.84968032]
Add Comment
Please, Sign In to add comment