Fusions

Fusion

class openrec.legacy.modules.fusions.Fusion(train=True, l2_reg=None, scope=None, reuse=False)[source]

A direct inheritance of the Module.

Concat

class openrec.legacy.modules.fusions.Concat(module_list, axis=1, scope=None, reuse=False)[source]

The Concat module outputs the concatenation of the outputs from multiple modules.

Parameters:
  • module_list (list) – The list of modules.
  • scope (str, optional) – Scope for module variables.
  • reuse (bool, optional) – Whether or not to reuse module variables.
_build_shared_graph()[source]

Build shared computational graphs across training and serving (may be overridden).

Average

class openrec.legacy.modules.fusions.Average(module_list, weight=1.0, scope=None, reuse=False)[source]

The Average module outputs the element-wise average of the outputs from multiple modules.

Parameters:
  • module_list (list) – The list of modules.
  • weight (float) – A value elementwise multiplied to module outputs.
  • scope (str, optional) – Scope for module variables.
  • reuse (bool, optional) – Whether or not to reuse module variables.
_build_shared_graph()[source]

Build shared computational graphs across training and serving (may be overridden).