Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in Python by (16.4k points)

I'm experiencing this reinforcement learning instructional exercise and It's been truly incredible up until now yet might someone be able to please clarify what 

newQ = model.predict(new_state.reshape(1,64), batch_size=1)

and

model.fit(X_train, y_train, batch_size=batchSize, nb_epoch=1, verbose=1)

mean?

As in what do the contentions bach_size, nb_epoch, and verbose do? I realize neural networks so clarifying regarding that would be useful. 

You could likewise send me a link where the documentation of these functions can be found.

1 Answer

0 votes
by (26.4k points)

Above all else, it shocks me that you were unable to discover the documentation yet I surmise you just had misfortune while looking. 

The documentation states for model.fit:

fit(self, x, y, batch_size=32, nb_epoch=10, verbose=1, callbacks=[], validation_split=0.0, validation_data=None, shuffle=True, class_weight=None, sample_weight=None)

  • batch_size: integer. Number of samples per gradient update.
  • nb_epoch: integer, the number of times to iterate over the training data arrays.
  • verbose: 0, 1, or 2. Verbosity mode. 0 = silent, 1 = verbose, 2 = one log line per epoch.

The batch_size parameter if there should be an occurrence of model.predict is only the quantity of tests utilized for every expectation step. So calling model.predict one time burns-through batch_size number of data samples. This helps for gadgets that can cycle huge matrices rapidly, (for example, GPUs).

Are you looking for a good python tutorial? Join the python course fast and gain more knowledge in python.

Watch this video tutorial on how to become a professional in python

Browse Categories

...