VisualPMF

class openrec.recommenders.VisualPMF(batch_size, max_user, max_item, dim_embed, dims, item_f_source, test_batch_size=None, item_serving_size=None, dropout_rate=None, l2_reg=None, l2_reg_mlp=None, opt='SGD', sess_config=None)[source]
_build_default_fusions(train=True)[source]

Build default fusion modules (may be overriden).

Parameters:train (bool) – An indicator for training or servining phase.
_build_item_extractions(train=True)[source]

Build extraction modules for items’ data sources (should be overriden)

Parameters:train (bool) – An indicator for training or servining phase.
_build_item_inputs(train=True)[source]

Build inputs for items’ data sources (should be overriden)

Parameters:train (bool) – An indicator for training or servining phase.
_input_mappings(batch_data, train)[source]

Define mappings from input training batch to defined inputs.

Parameters:
  • batch_data (dict) – A training batch.
  • train (bool) – An indicator for training or servining phase.
Returns:

The mapping where a key corresponds to an input object, and a value corresponds to a batch_data value.

Return type:

dict