September 2018
Intermediate to advanced
296 pages
9h 10m
English
The actor script is where the policy model is defined. We begin by importing certain modules from Keras: layers, optimizers, models, and the backend. These modules will help us to construct our neural network: Let's start by importing the required functions from Keras.
from keras import layers, models, optimizersfrom keras import backend as K
class Actor: # """Actor (policy) Model. """ def __init__(self, state_size, action_size): self.state_size = state_size self.action_size = action_size
Read now
Unlock full access