1
1
import pytest
2
- import tensorflow as tf
3
2
4
3
from deepctr .models import xDeepFM
5
- from ..utils import check_model , get_test_data , SAMPLE_SIZE , get_test_data_estimator , check_estimator
4
+ from ..utils import check_model , get_test_data , SAMPLE_SIZE , get_test_data_estimator , check_estimator , TEST_Estimator
6
5
7
6
8
7
@pytest .mark .parametrize (
15
14
)
16
15
def test_xDeepFM (dnn_hidden_units , cin_layer_size , cin_split_half , cin_activation , sparse_feature_num ,
17
16
dense_feature_dim ):
18
- if tf .__version__ == "1.15.0" or tf .__version__ == "1.4.0" : # slow in tf 1.15
19
- return
20
17
model_name = "xDeepFM"
21
18
22
19
sample_size = SAMPLE_SIZE
@@ -46,6 +43,9 @@ def test_xDeepFM(dnn_hidden_units, cin_layer_size, cin_split_half, cin_activatio
46
43
)
47
44
def test_xDeepFMEstimator (dnn_hidden_units , cin_layer_size , cin_split_half , cin_activation , sparse_feature_num ,
48
45
dense_feature_dim ):
46
+ import tensorflow as tf
47
+ if not TEST_Estimator or tf .__version__ == "1.4.0" :
48
+ return
49
49
from deepctr .estimator import xDeepFMEstimator
50
50
51
51
sample_size = SAMPLE_SIZE
@@ -61,4 +61,4 @@ def test_xDeepFMEstimator(dnn_hidden_units, cin_layer_size, cin_split_half, cin_
61
61
62
62
63
63
if __name__ == "__main__" :
64
- pass
64
+ pass
0 commit comments