dicee.models.dualE ================== .. py:module:: dicee.models.dualE Classes ------- .. autoapisummary:: dicee.models.dualE.DualE Module Contents --------------- .. py:class:: DualE(args) Bases: :py:obj:`dicee.models.base_model.BaseKGE` Dual Quaternion Knowledge Graph Embeddings (https://ojs.aaai.org/index.php/AAAI/article/download/16850/16657) .. py:attribute:: name :value: 'DualE' .. py:attribute:: entity_embeddings .. py:attribute:: relation_embeddings .. py:attribute:: num_ent :value: None .. py:method:: kvsall_score(e_1_h, e_2_h, e_3_h, e_4_h, e_5_h, e_6_h, e_7_h, e_8_h, e_1_t, e_2_t, e_3_t, e_4_t, e_5_t, e_6_t, e_7_t, e_8_t, r_1, r_2, r_3, r_4, r_5, r_6, r_7, r_8) -> torch.tensor KvsAll scoring function Input --------- x: torch.LongTensor with (n, ) shape Output ------- torch.FloatTensor with (n) shape .. py:method:: forward_triples(idx_triple: torch.tensor) -> torch.tensor Negative Sampling forward pass: Input --------- x: torch.LongTensor with (n, ) shape Output ------- torch.FloatTensor with (n) shape .. py:method:: forward_k_vs_all(x) KvsAll forward pass Input --------- x: torch.LongTensor with (n, ) shape Output ------- torch.FloatTensor with (n) shape .. py:method:: T(x: torch.tensor) -> torch.tensor Transpose function Input: Tensor with shape (nxm) Output: Tensor with shape (mxn)