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!
소스 검색

Remove loss as no longer necessary.

master
Stanislaw Adaszewski 4 년 전
부모
커밋
72356545aa
3개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. +0
    -0
      src/icosagon/unused/loss.py
  2. +7
    -1
      tests/icosagon/test_batch.py
  3. +0
    -0
      tests/icosagon/unused/test_loss.py

src/icosagon/loss.py → src/icosagon/unused/loss.py 파일 보기


+ 7
- 1
tests/icosagon/test_batch.py 파일 보기

@@ -31,7 +31,7 @@ def test_predictions_batch_01():
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)),
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)),
TrainValTest(torch.zeros(0), torch.zeros(0), torch.zeros(0))
)
@@ -40,7 +40,13 @@ def test_predictions_batch_01():
batch = PredictionsBatch(pred, part_type='train', batch_size=1)
count = 0
lst = []
for (input, target) in batch:
assert len(input) == 1
assert len(target) == 1
lst.append((input[0], target[0]))
count += 1
assert lst == [ (1, 1), (0, 1), (1, 1), (0, 1), (1, 1),
(1, 0), (0, 0), (1, 0), (0, 0), (1, 0) ]
assert count == 10

tests/icosagon/test_loss.py → tests/icosagon/unused/test_loss.py 파일 보기


불러오는 중...
취소
저장