ConcatVisualBPR

class openrec.legacy.recommenders.ConcatVisualBPR(batch_size, max_user, max_item, dim_embed, dim_ve, item_f_source, item_serving_size=None, l2_reg=None, 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.
_grad_post_processing(grad_var_list)[source]

Post-process gradients before updating variables.

Parameters:grad_var_list (list) – A list of tuples (gradients, variable).
Returns:A list of updated tuples (updated gradients, variables).
Return type:list
_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