Both actor fcnn and critic fcnn has this condition
if hidden_layers != len(nodes_per_layer) or hidden_layers != len(activation_functions)+1:if hidden_layers != len(nodes_per_layer):act_log.error("Number of nodes per layer does not match the number of hidden layers in the config.")else: # hidden_layers != len(activation_functions)+1act_log.error("Number of activation functions (+1 for output layer) does not match the number of hidden layers in the config.")
The second condition in the if statement will always be true unless you provide activation_function list one short of number of hidden layers which will eventually throw error later in the model building. I believe it was meant to be something like below?
hidden_layers != len(activation_functions)-1
Both actor fcnn and critic fcnn has this condition
if hidden_layers != len(nodes_per_layer) or hidden_layers != len(activation_functions)+1:
if hidden_layers != len(nodes_per_layer):
act_log.error("Number of nodes per layer does not match the number of hidden layers in the config.")
else: # hidden_layers != len(activation_functions)+1
act_log.error("Number of activation functions (+1 for output layer) does not match the number of hidden layers in the config.")
The second condition in the if statement will always be true unless you provide activation_function list one short of number of hidden layers which will eventually throw error later in the model building. I believe it was meant to be something like below?
hidden_layers != len(activation_functions)-1
Sorry for missing this in review.