prevision_quantum_nn.applications.reinforcement_learning.deep_q_learning
¶
Deep Q Learning module
Module Contents¶
Classes¶
DeepQLearner. |
|
Deep Fully Connected Learner. |
-
class
prevision_quantum_nn.applications.reinforcement_learning.deep_q_learning.
DeepQLearner
(params=None)¶ Bases:
prevision_quantum_nn.applications.reinforcement_learning.base_learner.BaseLearner
DeepQLearner.
Base class for further implementations of Deep Q Learners
-
params
¶ contains the parameters of the model
- Type
dictionary
-
input_size
¶ the size of the state space
- Type
int
-
model
¶ the model itself
- Type
tf.keras.model
-
optimizer_name
¶ the name of the optimizer, can be adam for example
- Type
str
-
fit
(self, x_train, y_train)¶ Fit the model.
- Parameters
x_train (numpy array) – contains the features of the observations
y_train (numpy array) – contains the targets of the observations
-
-
class
prevision_quantum_nn.applications.reinforcement_learning.deep_q_learning.
DeepFullyConnectedLearner
(params=None)¶ Bases:
prevision_quantum_nn.applications.reinforcement_learning.deep_q_learning.DeepQLearner
Deep Fully Connected Learner.
This deep model is based on a fully connected neural network structure.
-
build
(self)¶ builds the keras model given a fixed strucutre
-
forward
(self, state)¶ Forwards a state through the neural network.
- Parameters
state (numpy array) – state at which the model needs to predict the Q-value
-