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

Add test_[dedicom,dist_mult,bilinear,inner_product]_decoder_parameter_count_01().

master
Stanislaw Adaszewski 4 년 전
부모
커밋
77c52d8543
1개의 변경된 파일28개의 추가작업 그리고 0개의 파일을 삭제
  1. +28
    -0
      tests/icosagon/test_decode.py

+ 28
- 0
tests/icosagon/test_decode.py 파일 보기

@@ -210,3 +210,31 @@ def test_empty_inner_product_decoder_01():
for i in range(len(res)):
assert res[i].shape == (0,)
def test_dedicom_decoder_parameter_count_01():
dec = DEDICOMDecoder(32, 7, keep_prob=1.,
activation=torch.sigmoid)
assert len(list(dec.parameters())) == 8
def test_dist_mult_decoder_parameter_count_01():
dec = DistMultDecoder(32, 7, keep_prob=1.,
activation=torch.sigmoid)
assert len(list(dec.parameters())) == 7
def test_bilinear_decoder_parameter_count_01():
dec = BilinearDecoder(32, 7, keep_prob=1.,
activation=torch.sigmoid)
assert len(list(dec.parameters())) == 7
def test_inner_product_decoder_parameter_count_01():
dec = InnerProductDecoder(32, 7, keep_prob=1.,
activation=torch.sigmoid)
assert len(list(dec.parameters())) == 0

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