(var_name, embedding_shape)
| 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') |
nothing calls this directly
no outgoing calls
no test coverage detected