mlpack
Public Member Functions | List of all members
mlpack.preprocess_json_params.restore_value Class Reference
Inheritance diagram for mlpack.preprocess_json_params.restore_value:
Inheritance graph
[legend]
Collaboration diagram for mlpack.preprocess_json_params.restore_value:
Collaboration graph
[legend]

Public Member Functions

def encode (self, o)
 

Detailed Description

This is a custom encoder that converts a dictionary to
correct json format for ingesting in cereal.
Eg:
dict({
  vec_state: 1,
  n_rows: 2,
  n_cols: 1,
  elem: [1,2]
})

will be converted into

str({
  vec_state: 1,
  n_rows: 2,
  n_cols: 1,
  elem: 1,
  elem: 2
})
while encoding.
This is used to create a json that can be ingested to cereal.

The documentation for this class was generated from the following file: