MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / body

Function body

modelzoo/features/multihash_variable/dien/script/utils.py:368–374  ·  view source on GitHub ↗
(batch, output, i)

Source from the content-addressed store, hash-verified

366 return tf.less(i, tf.shape(batch)[1])
367
368 def body(batch, output, i):
369 self_attention_tmp = din_fcn_attention(batch[:, i, :], batch[:, 0:i+1, :],
370 ATTENTION_SIZE, mask[:, 0:i+1], softmax_stag=1, stag=stag,
371 mode='LIST')
372 self_attention_tmp = tf.reduce_sum(self_attention_tmp, 1)
373 output = output.write(i, self_attention_tmp)
374 return batch, output, i + 1
375
376 output_ta = tf.TensorArray(dtype=tf.float32,
377 size=0,

Callers

nothing calls this directly

Calls 3

reduce_sumMethod · 0.80
din_fcn_attentionFunction · 0.70
writeMethod · 0.45

Tested by

no test coverage detected