bigdl.models.lenet package

Submodules

bigdl.models.lenet.lenet5 module

bigdl.models.lenet.lenet5.build_model(class_num)[source]

bigdl.models.lenet.utils module

bigdl.models.lenet.utils.get_end_trigger(options)[source]

When to end the optimization based on input option.

bigdl.models.lenet.utils.get_mnist(sc, data_type='train', location='/tmp/mnist')[source]

Get mnist dataset and parallelize into RDDs. Data would be downloaded automatically if it doesn’t present at the specific location.

Parameters:
  • sc – SparkContext.
  • data_type – “train” for training data and “test” for testing data.
  • location – Location to store mnist dataset.
Returns:

RDD of (features: ndarray, label: ndarray).

bigdl.models.lenet.utils.preprocess_mnist(sc, options)[source]

Preprocess mnist dataset. Normalize and transform into Sample of RDDs.

bigdl.models.lenet.utils.validate_optimizer(optimizer, test_data, options)[source]

Set validation and checkpoint for distributed optimizer.

Module contents