MCPcopy
hub / github.com/shenweichen/DeepCTR-Torch / test_NFM

Function test_NFM

tests/models/NFM_test.py:12–21  ·  view source on GitHub ↗
(hidden_size, sparse_feature_num)

Source from the content-addressed store, hash-verified

10 [((8,), 2), ((8, 8,), 2), ((8,), 1)]
11)
12def test_NFM(hidden_size, sparse_feature_num):
13 model_name = "NFM"
14
15 sample_size = SAMPLE_SIZE
16 x, y, feature_columns = get_test_data(
17 sample_size, sparse_feature_num=sparse_feature_num, dense_feature_num=sparse_feature_num)
18
19 model = NFM(feature_columns, feature_columns,
20 dnn_hidden_units=[32, 32], dnn_dropout=0.5, device=get_device())
21 check_model(model, model_name, x, y)
22
23
24if __name__ == "__main__":

Callers

nothing calls this directly

Calls 4

NFMClass · 0.90
get_test_dataFunction · 0.85
check_modelFunction · 0.85
get_deviceFunction · 0.50

Tested by

no test coverage detected