Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

evaluate_generator

Evaluates the model on a data generator.


Description

The generator should return the same kind of data as accepted by test_on_batch().

Usage

evaluate_generator(
  object,
  generator,
  steps,
  max_queue_size = 10,
  workers = 1,
  callbacks = NULL
)

Arguments

object

Model object to evaluate

generator

Generator yielding lists (inputs, targets) or (inputs, targets, sample_weights)

steps

Total number of steps (batches of samples) to yield from generator before stopping.

max_queue_size

Maximum size for the generator queue. If unspecified, max_queue_size will default to 10.

workers

Maximum number of threads to use for parallel processing. Note that parallel processing will only be performed for native Keras generators (e.g. flow_images_from_directory()) as R based generators must run on the main thread.

callbacks

List of callbacks to apply during evaluation.

Value

Named list of model test loss (or losses for models with multiple outputs) and model metrics.

See Also


keras

R Interface to 'Keras'

v2.4.0
MIT + file LICENSE
Authors
Daniel Falbel [ctb, cph, cre], JJ Allaire [aut, cph], François Chollet [aut, cph], RStudio [ctb, cph, fnd], Google [ctb, cph, fnd], Yuan Tang [ctb, cph] (<https://orcid.org/0000-0001-5243-233X>), Wouter Van Der Bijl [ctb, cph], Martin Studer [ctb, cph], Sigrid Keydana [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.