Skip to content

Commit

Permalink
Update for v0.2.0a
Browse files Browse the repository at this point in the history
  • Loading branch information
Weichen Shen committed Dec 22, 2018
1 parent aad52c4 commit ba362cc
Show file tree
Hide file tree
Showing 22 changed files with 19 additions and 34 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.h5
*.ipynb
.pytest_cache/
tests/unused/*
# Byte-compiled / optimized / DLL files
Expand Down
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ python:
- "3.6"

env:
- TF_VERSION=1.12.0
- TF_VERSION=1.4.0
- TF_VERSION=1.5.1 #- TF_VERSION=1.5.0
- TF_VERSION=1.6.0
#Not Support- TF_VERSION=1.7.0
#Not Support- TF_VERSION=1.7.1
#Not Support- TF_VERSION=1.8.0
- TF_VERSION=1.9.0
- TF_VERSION=1.10.0 #- TF_VERSION=1.10.1
- TF_VERSION=1.11.0
- TF_VERSION=1.12.0
- TF_VERSION=1.5.1 #- TF_VERSION=1.5.0
- TF_VERSION=1.6.0

matrix:
allow_failures:
Expand Down
2 changes: 1 addition & 1 deletion deepctr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
from .import sequence
from . import models
from .utils import check_version
__version__ = '0.2.0a1'
__version__ = '0.2.0a'
check_version(__version__)
2 changes: 1 addition & 1 deletion deepctr/models/afm.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def AFM(feature_dim_dict, embedding_size=8, use_attention=True, attention_factor
for i in range(len(sparse_input))]
if len(linear_term) > 1:
linear_term = add(linear_term)
elif len(linear_term) > 0:
elif len(linear_term) == 1:
linear_term = linear_term[0]

if len(dense_input) > 0:
Expand Down
2 changes: 1 addition & 1 deletion deepctr/models/deepfm.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def DeepFM(feature_dim_dict, embedding_size=8,
for i in range(len(sparse_input))]
if len(linear_term) > 1:
linear_term = add(linear_term)
elif len(linear_term) > 0:
elif len(linear_term) == 1:
linear_term = linear_term[0]

if len(dense_input) > 0:
Expand Down
2 changes: 0 additions & 2 deletions deepctr/models/fnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ def FNN(feature_dim_dict, embedding_size=8,
linear_term = add(linear_term)
elif len(linear_term) == 1:
linear_term = linear_term[0]
else:
linear_term = 0

if len(dense_input) > 0:
continuous_embedding_list = list(
Expand Down
2 changes: 0 additions & 2 deletions deepctr/models/nfm.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ def NFM(feature_dim_dict, embedding_size=8,
linear_term = add(linear_term)
elif len(linear_term) == 1:
linear_term = linear_term[0]
else:
linear_term = 0

if len(dense_input) > 0:
continuous_embedding_list = list(
Expand Down
5 changes: 2 additions & 3 deletions deepctr/models/xdeepfm.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@ def xDeepFM(feature_dim_dict, embedding_size=8, hidden_size=(256, 256), cin_laye
for i in range(len(sparse_input))]
if len(linear_term) > 1:
linear_term = add(linear_term)
elif len(linear_term) > 0:
elif len(linear_term) == 1:
linear_term = linear_term[0]
else:
linear_term = 0

if len(dense_input) > 0:
continuous_embedding_list = list(
map(Dense(embedding_size, use_bias=False, kernel_regularizer=l2(l2_reg_embedding), ),
Expand Down
2 changes: 1 addition & 1 deletion docs/source/History.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# History
- 12/22/2018 : [v0.2.0a1](https://github.com/shenweichen/DeepCTR/releases/tag/v0.2.0a1) released.Add [xDeepFM](./Features.html#xdeepfm) and automatic check for new version.
- 12/22/2018 : [v0.2.0a1](https://github.com/shenweichen/DeepCTR/releases/tag/v0.2.0a) released.Add [xDeepFM](./Features.html#xdeepfm) and automatic check for new version.
- 12/19/2018 : [v0.1.6](https://github.com/shenweichen/DeepCTR/releases/tag/v0.1.6) released.Now DeepCTR is compatible with tensorflow from `1.4-1.12` except for `1.7` and `1.8`.
- 29/11/2018 : [v0.1.4](https://github.com/shenweichen/DeepCTR/releases/tag/v0.1.4) released.Add [FAQ](./FAQ.html) in docs
- 11/24/2018 : DeepCTR first version v0.1.0 is released on [PyPi](https://pypi.org/project/deepctr/)
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# The short X.Y version
version = ''
# The full version, including alpha/beta/rc tags
release = '0.2.0a1'
release = '0.2.0a'


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ You can read the latest code at https://github.com/shenweichen/DeepCTR
News
-----

12/22/2018 : Add `xDeepFM <./Features.html#xdeepfm>`_ and automatic check for new version. `Changelog <https://github.com/shenweichen/DeepCTR/releases/tag/v0.2.0a1>`_
12/22/2018 : Add `xDeepFM <./Features.html#xdeepfm>`_ and automatic check for new version. `Changelog <https://github.com/shenweichen/DeepCTR/releases/tag/v0.2.0a>`_

12/19/2018 : DeepCTR is compatible with tensorflow from ``1.4-1.12`` except for ``1.7`` and ``1.8``. `Changelog <https://github.com/shenweichen/DeepCTR/releases/tag/v0.1.6>`_

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setuptools.setup(
name="DeepCTR",
version="0.2.0a1",
version="0.2.0a",
author="Weichen Shen",
author_email="wcshen1994@163.com",
description="Easy-to-use,Modular and Extendible package of deep learning based CTR(Click Through Rate) prediction models with tensorflow.",
Expand Down
2 changes: 0 additions & 2 deletions tests/models/AFM_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import numpy as np
import pytest
from tensorflow.python.keras.models import save_model, load_model
from deepctr.models import AFM
from deepctr.utils import custom_objects
from ..utils import check_model


Expand Down
2 changes: 0 additions & 2 deletions tests/models/DCN_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import numpy as np
import pytest
from deepctr.models import DCN
from deepctr.utils import custom_objects
from tensorflow.python.keras.models import save_model, load_model
from ..utils import check_model


Expand Down
2 changes: 0 additions & 2 deletions tests/models/DeepFM_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import numpy as np
import pytest
from deepctr.models import DeepFM
from deepctr.utils import custom_objects
from tensorflow.python.keras.models import save_model, load_model
from ..utils import check_model


Expand Down
1 change: 0 additions & 1 deletion tests/models/FNN_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import numpy as np
import pytest
from deepctr.models import FNN
from deepctr.utils import custom_objects

from ..utils import check_model

Expand Down
2 changes: 0 additions & 2 deletions tests/models/MLR_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import numpy as np
import pytest
from deepctr.models import MLR
from deepctr.utils import custom_objects
from tensorflow.python.keras.models import save_model, load_model
from ..utils import check_model


Expand Down
2 changes: 0 additions & 2 deletions tests/models/NFM_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import numpy as np
import pytest
from deepctr.models import NFM
from deepctr.utils import custom_objects
from tensorflow.python.keras.models import save_model, load_model
from ..utils import check_model


Expand Down
2 changes: 0 additions & 2 deletions tests/models/PNN_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
import pytest

from deepctr.models import PNN
from deepctr.utils import custom_objects
from tensorflow.python.keras.models import save_model, load_model
from ..utils import check_model


Expand Down
2 changes: 0 additions & 2 deletions tests/models/WDL_test.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import numpy as np
import pytest
from tensorflow.python.keras.models import load_model, save_model

from deepctr.models import WDL
from deepctr.utils import custom_objects
from ..utils import check_model


Expand Down
2 changes: 0 additions & 2 deletions tests/models/xDeepFM_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import numpy as np
import pytest
from deepctr.models import xDeepFM
from deepctr.utils import custom_objects
from tensorflow.python.keras.models import save_model, load_model
from ..utils import check_model


Expand Down
6 changes: 6 additions & 0 deletions tests/utils_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from deepctr.utils import check_version


def test_check_version():
check_version('0.1.0')
check_version(124214)

0 comments on commit ba362cc

Please sign in to comment.