IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
Pārlūkot izejas kodu

Add some asserts to test_cross_entropy_loss_01().

master
Stanislaw Adaszewski pirms 4 gadiem
vecāks
revīzija
4ab4bd6eb2
1 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  1. +6
    -0
      tests/icosagon/test_loss.py

+ 6
- 0
tests/icosagon/test_loss.py Parādīt failu

@@ -22,6 +22,12 @@ def test_cross_entropy_loss_01():
prep_d = prepare_training(d, TrainValTest(1., 0., 0.))
assert len(prep_d.relation_families) == 1
assert len(prep_d.relation_families[0].relation_types) == 1
assert len(prep_d.relation_families[0].relation_types[0].edges_pos.train) == 5
assert len(prep_d.relation_families[0].relation_types[0].edges_pos.val) == 0
assert len(prep_d.relation_families[0].relation_types[0].edges_pos.test) == 0
rel_pred = RelationPredictions(
TrainValTest(torch.tensor([1, 0, 1, 0, 1], dtype=torch.float32), torch.zeros(0), torch.zeros(0)),
TrainValTest(torch.zeros(0), torch.zeros(0), torch.zeros(0)),


Notiek ielāde…
Atcelt
Saglabāt