MCPcopy Create free account
hub / github.com/alibaba/bigcomputing / __call__

Method __call__

DIEN/utils.py:75–85  ·  view source on GitHub ↗
(self, args)

Source from the content-addressed store, hash-verified

73 initializer=bias_initializer)
74
75 def __call__(self, args):
76 if not self._is_sequence:
77 args = [args]
78
79 if len(args) == 1:
80 res = math_ops.matmul(args[0], self._weights)
81 else:
82 res = math_ops.matmul(array_ops.concat(args, 1), self._weights)
83 if self._build_bias:
84 res = nn_ops.bias_add(res, self._biases)
85 return res
86
87def din_attention(query, facts, attention_size, mask=None, stag='null', mode='SUM', softmax_stag=1, time_major=False, return_alphas=False):
88 if isinstance(facts, tuple):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected