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!
Kaynağa Gözat

Fix test_decode_layer_04.

master
Stanislaw Adaszewski 4 yıl önce
ebeveyn
işleme
5ab9231efc
1 değiştirilmiş dosya ile 6 ekleme ve 6 silme
  1. +6
    -6
      tests/icosagon/test_declayer.py

+ 6
- 6
tests/icosagon/test_declayer.py Dosyayı Görüntüle

@@ -102,17 +102,17 @@ def test_decode_layer_03():
def test_decode_layer_04():
d = Data()
d.add_node_type('Dummy', 100)
assert len(d.relation_types[0, 0]) == 0
assert len(d.relation_families) == 0
prep_d = prepare_training(d, TrainValTest(.8, .1, .1))
in_layer = OneHotInputLayer(d)
d_layer = DecagonLayer(in_layer.output_dim, 32, d)
dec_layer = DecodeLayer(input_dim=d_layer.output_dim, data=prep_d, keep_prob=1.,
decoder_class=DEDICOMDecoder, activation=lambda x: x)
dec_layer = DecodeLayer(input_dim=d_layer.output_dim, data=prep_d,
keep_prob=1., activation=lambda x: x)
seq = torch.nn.Sequential(in_layer, d_layer, dec_layer)
pred_adj_matrices = seq(None)
pred = seq(None)
assert isinstance(pred_adj_matrices, dict)
assert len(pred_adj_matrices) == 0
assert isinstance(pred, Predictions)
assert len(pred.relation_families) == 0

Yükleniyor…
İptal
Kaydet