MCPcopy Create free account
hub / github.com/google-research/language / simple_entity_encode_op

Method simple_entity_encode_op

language/emql/model.py:946–952  ·  view source on GitHub ↗

Wrapper to encode a single entity into its EmQL representation.

(self, params, ent)

Source from the content-addressed store, hash-verified

944 return object_embs, object_sketch
945
946 def simple_entity_encode_op(self, params, ent):
947 """Wrapper to encode a single entity into its EmQL representation."""
948 set_ids = tf.expand_dims(ent, axis=1)
949 set_mask = tf.ones_like(set_ids, dtype=tf.float32)
950 return module.encode_op(params, set_ids, set_mask,
951 self.entity_embeddings_mat,
952 self.all_entity_sketches)
953
954 def simple_relation_encode_op(self, params, rel):
955 """Wrapper to encode a single relation into its EmQL representation."""

Callers 1

model_query2boxMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected