December 2018
Intermediate to advanced
764 pages
18h 18m
English
We proceed with the policy as follows:
def policy_naive_nn(nn,obs): return np.argmax(nn.predict(np.array([obs])))
from keras.models import Sequentialfrom keras.layers import Densemodel = Sequential()model.add(Dense(8,input_dim=4, activation='relu'))model.add(Dense(2, activation='softmax'))model.compile(loss='categorical_crossentropy',optimizer='adam')model.summary()
This is what the model ...
Read now
Unlock full access