easy_rec.python.builders

easy_rec.python.builders.hyperparams_builder

Builder function to construct tf-slim arg_scope for convolution, fc ops.

easy_rec.python.builders.hyperparams_builder.build_regularizer(regularizer)[source]

Builds a tensorflow regularizer from config.

Parameters:

regularizer – hyperparams_pb2.Hyperparams.regularizer proto.

Returns:

tensorflow regularizer.

Raises:

ValueError – On unknown regularizer.

easy_rec.python.builders.hyperparams_builder.build_initializer(initializer)[source]

Build a tf initializer from config.

Parameters:

initializer – hyperparams_pb2.Hyperparams.regularizer proto.

Returns:

tf initializer.

Raises:

ValueError – On unknown initializer.

easy_rec.python.builders.optimizer_builder

Functions to build training optimizers.

easy_rec.python.builders.optimizer_builder.build(optimizer_config)[source]

Create optimizer based on config.

Parameters:

optimizer_config – A Optimizer proto message.

Returns:

An optimizer and a list of variables for summary.

Raises:

ValueError – when using an unsupported input data type.

easy_rec.python.builders.strategy_builder

easy_rec.python.builders.strategy_builder.build(train_config)[source]