def _build_default_fusions(self, train=True): if train: self._add_module( 'p_item_vec', Average(scope='item_concat', reuse=False, module_list=[ self._get_module('p_item_vec'), self._get_module('p_item_vf') ], weight=2.0)) self._add_module( 'n_item_vec', Average(scope='item_concat', reuse=True, module_list=[ self._get_module('n_item_vec'), self._get_module('n_item_vf') ], weight=2.0)) else: self._add_module('item_vec', Average(scope='item_concat', reuse=True, module_list=[ self._get_module('item_vec', train=train), self._get_module('item_vf', train=train) ], weight=2.0), train=False)
def _build_default_fusions(self, train=True): self._add_module('item_vec', Average(scope='item_average', reuse=not train, module_list=[ self._get_module('item_vec', train=train), self._get_module('item_vf', train=train) ], weight=2.0), train=train)
def _build_default_fusions(self, train=True): if train: self._add_module( "p_item_vec", Average( scope="item_concat", reuse=False, module_list=[ self._get_module("p_item_vec"), self._get_module("p_item_vf"), ], weight=2.0, ), ) self._add_module( "n_item_vec", Average( scope="item_concat", reuse=True, module_list=[ self._get_module("n_item_vec"), self._get_module("n_item_vf"), ], weight=2.0, ), ) else: self._add_module( "item_vec", Average( scope="item_concat", reuse=True, module_list=[ self._get_module("item_vec", train=train), self._get_module("item_vf", train=train), ], weight=2.0, ), train=False, )
def _build_default_fusions(self, train=True): super(UserVisualPMF, self)._build_default_fusions(train) self._add_module('user_vec', Average(scope='user_average', reuse=not train, module_list=[ self._get_module('user_vec', train=train), self._get_module('user_f', train=train) ], weight=2.0), train=train)
def _build_default_fusions(self, train=True): self._add_module( "item_vec", Average( scope="item_average", reuse=not train, module_list=[ self._get_module("item_vec", train=train), self._get_module("item_f", train=train), ], weight=2.0, ), train=train, )
def _build_default_fusions(self, train=True): super(UserVisualPMF, self)._build_default_fusions(train) self._add_module( "user_vec", Average( scope="user_average", reuse=not train, module_list=[ self._get_module("user_vec", train=train), self._get_module("user_f", train=train), ], weight=2.0, ), train=train, )