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

Method get_embeddings_variable

DIEN/model_taobao_allfea.py:11–15  ·  view source on GitHub ↗
(var_name, embedding_shape)

Source from the content-addressed store, hash-verified

9 self.model_flag = Flag
10 self.use_negsample= use_negsample
11 def get_embeddings_variable(var_name, embedding_shape):
12 # workaround to return vector of 0
13 embeddings = tf.get_variable(var_name, embedding_shape, trainable=True)
14 embeddings = tf.concat([ embeddings, [tf.constant([0.] * embedding_shape[1])] ], axis = 0)
15 return embeddings
16
17 with tf.name_scope('Inputs'):
18 self.item_id_his_batch_ph = tf.placeholder(tf.int32, [None, None], name='item_id_his_batch_ph')

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected