predict_generator: Generates predictions for the input samples from a data...

Description Usage Arguments Value Raises See Also

View source: R/model.R

Description

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

Usage

1
2
3
4
5
6
7
8
9
predict_generator(
  object,
  generator,
  steps,
  max_queue_size = 10,
  workers = 1,
  verbose = 0,
  callbacks = NULL
)

Arguments

object

Keras model object

generator

Generator yielding batches of input samples.

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.

verbose

verbosity mode, 0 or 1.

callbacks

List of callbacks to apply during prediction.

Value

Numpy array(s) of predictions.

Raises

ValueError: In case the generator yields data in an invalid format.

See Also

Other model functions: compile.keras.engine.training.Model(), evaluate.keras.engine.training.Model(), evaluate_generator(), fit.keras.engine.training.Model(), fit_generator(), get_config(), get_layer(), keras_model_sequential(), keras_model(), multi_gpu_model(), pop_layer(), predict.keras.engine.training.Model(), predict_on_batch(), predict_proba(), summary.keras.engine.training.Model(), train_on_batch()


dfalbel/keras documentation built on Nov. 27, 2019, 8:16 p.m.