mlpack
|
Public Member Functions | |
def | encode (self, o) |
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.