Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. def __init__ (self):
  2. self.model = Sequential()
  3. self.model.add(Dense(4, input_shape=(4,), activation='linear'))
  4. self.model.compile(optimizer='adam', loss='mse')
  5. def run(self):
  6. x = [1., 1., 1., 1.]
  7. print('x:', x, 'x shape:', np.shape(x))
  8. y = [0., 0., 0., 0.]
  9. print('y:', y, 'y shape:', np.shape(y))
  10. self.model.fit(x, y, batch_size=1, epochs=1, verbose=2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement