-
Notifications
You must be signed in to change notification settings - Fork 534
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support saving&loading model and higher version tf
- support saving&loading model - support higher version of tensorflow
- Loading branch information
Showing
28 changed files
with
1,284 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
path: | ||
- 'deepmatch/*' | ||
- 'tests/*' | ||
pull_request: | ||
path: | ||
- 'deepmatch/*' | ||
- 'tests/*' | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
timeout-minutes: 120 | ||
strategy: | ||
matrix: | ||
python-version: [3.5,3.6,3.7] | ||
tf-version: [1.4.0,1.14.0,2.1.0] | ||
|
||
exclude: | ||
- python-version: 3.7 | ||
tf-version: 1.4.0 | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v1 | ||
|
||
- name: Setup python environment | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip3 install -q tensorflow==${{ matrix.tf-version }} | ||
pip install -q requests | ||
pip install -e . | ||
- name: Test with pytest | ||
timeout-minutes: 120 | ||
run: | | ||
pip install -q pytest | ||
pip install -q pytest-cov | ||
pip install -q python-coveralls | ||
pytest --cov=deepmatch --cov-report=xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{secrets.CODECOV_TOKEN}} | ||
file: ./coverage.xml | ||
flags: pytest | ||
name: py${{ matrix.python-version }}-tf${{ matrix.tf-version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from .utils import check_version | ||
|
||
__version__ = '0.1.1' | ||
__version__ = '0.1.2' | ||
check_version(__version__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from deepctr.layers import custom_objects | ||
from deepctr.layers.utils import reduce_sum | ||
|
||
from .core import PoolingLayer, Similarity, LabelAwareAttention, CapsuleLayer,SampledSoftmaxLayer,EmbeddingIndex | ||
from ..utils import sampledsoftmaxloss | ||
|
||
_custom_objects = {'PoolingLayer': PoolingLayer, | ||
'Similarity': Similarity, | ||
'LabelAwareAttention': LabelAwareAttention, | ||
'CapsuleLayer': CapsuleLayer, | ||
'reduce_sum':reduce_sum, | ||
'SampledSoftmaxLayer':SampledSoftmaxLayer, | ||
'sampledsoftmaxloss':sampledsoftmaxloss, | ||
'EmbeddingIndex':EmbeddingIndex | ||
} | ||
|
||
custom_objects = dict(custom_objects, **_custom_objects) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.