KGATE 0.3.1__tar.gz → 0.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {kgate-0.3.1 → kgate-0.3.2}/PKG-INFO +1 -1
- {kgate-0.3.1 → kgate-0.3.2}/pyproject.toml +1 -1
- {kgate-0.3.1 → kgate-0.3.2}/src/kgate/samplers.py +0 -8
- {kgate-0.3.1 → kgate-0.3.2}/LICENSE +0 -0
- {kgate-0.3.1 → kgate-0.3.2}/README.md +0 -0
- {kgate-0.3.1 → kgate-0.3.2}/src/kgate/__init__.py +0 -0
- {kgate-0.3.1 → kgate-0.3.2}/src/kgate/architect.py +0 -0
- {kgate-0.3.1 → kgate-0.3.2}/src/kgate/cli.py +0 -0
- {kgate-0.3.1 → kgate-0.3.2}/src/kgate/config_template.toml +0 -0
- {kgate-0.3.1 → kgate-0.3.2}/src/kgate/data_leakage.py +0 -0
- {kgate-0.3.1 → kgate-0.3.2}/src/kgate/decoders/__init__.py +0 -0
- {kgate-0.3.1 → kgate-0.3.2}/src/kgate/decoders/bilinear.py +0 -0
- {kgate-0.3.1 → kgate-0.3.2}/src/kgate/decoders/convolutional.py +0 -0
- {kgate-0.3.1 → kgate-0.3.2}/src/kgate/decoders/translational.py +0 -0
- {kgate-0.3.1 → kgate-0.3.2}/src/kgate/encoders.py +0 -0
- {kgate-0.3.1 → kgate-0.3.2}/src/kgate/evaluators.py +0 -0
- {kgate-0.3.1 → kgate-0.3.2}/src/kgate/grid_search.py +0 -0
- {kgate-0.3.1 → kgate-0.3.2}/src/kgate/inference.py +0 -0
- {kgate-0.3.1 → kgate-0.3.2}/src/kgate/knowledgegraph.py +0 -0
- {kgate-0.3.1 → kgate-0.3.2}/src/kgate/preprocessing.py +0 -0
- {kgate-0.3.1 → kgate-0.3.2}/src/kgate/utils.py +0 -0
|
@@ -276,11 +276,7 @@ class BernoulliNegativeSampler(NegativeSampler):
|
|
|
276
276
|
|
|
277
277
|
def corrupt_batch( self,
|
|
278
278
|
batch: torch.LongTensor,
|
|
279
|
-
<<<<<<< clean_functions
|
|
280
|
-
negative_triplet_count: Optional[int] = None):
|
|
281
|
-
=======
|
|
282
279
|
negative_triplet_count: int | None = None):
|
|
283
|
-
>>>>>>> main
|
|
284
280
|
"""
|
|
285
281
|
For each true triplet, produce a corrupted one not different from
|
|
286
282
|
any other true triplet. If `heads` and `tails` are cuda objects,
|
|
@@ -305,11 +301,7 @@ class BernoulliNegativeSampler(NegativeSampler):
|
|
|
305
301
|
"""
|
|
306
302
|
device = batch.device
|
|
307
303
|
batch_size = batch.shape[1]
|
|
308
|
-
<<<<<<< clean_functions
|
|
309
304
|
|
|
310
|
-
=======
|
|
311
|
-
|
|
312
|
-
>>>>>>> main
|
|
313
305
|
negative_triplet_count = negative_triplet_count or self.negative_triplet_count
|
|
314
306
|
|
|
315
307
|
negative_triplet_heads = batch[0].repeat(negative_triplet_count)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|