Are TextRepresentation and entity_initializer redundant? #1379
Answered
by
mberr
lorenzobalzani
asked this question in
Q&A
-
What's the difference between including from pykeen.triples import TriplesFactory
from pykeen.nn import TextRepresentation
from pykeen.models import DistMult
triples_factory = TriplesFactory.from_path("path/to/my/triples.txt")
entity_representations = TextRepresentation.from_triples_factory(
triples_factory=triples_factory,
encoder="transformer",
)
model = DistMult(
triples_factory=triples_factory,
embedding_dim=entity_representations.shape[0],
entity_representations=entity_representations,
entity_initializer=entity_representations.encoder.forward_normalized(
entity_representations.labels
),
random_seed=42,
) |
Beta Was this translation helpful? Give feedback.
Answered by
mberr
Mar 7, 2024
Replies: 1 comment
-
If you pass a pre-instantiated entity representation for |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
lorenzobalzani
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you pass a pre-instantiated entity representation for
entity_representations
, theentity_initializer
is ignored.