This repository has been archived by the owner on Mar 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
142 additions
and
67 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,29 @@ | ||
dist: xenial | ||
language: python | ||
python: | ||
- 2.7 | ||
- 3.6 | ||
python: "3.6" | ||
env: | ||
global: | ||
- COVERALLS_PARALLEL=true | ||
matrix: | ||
- KERAS_BACKEND=tensorflow | ||
- KERAS_BACKEND=tensorflow TF_KERAS=1 | ||
install: | ||
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; | ||
- bash miniconda.sh -b -p $HOME/miniconda | ||
- export PATH="$HOME/miniconda/bin:$PATH" | ||
- conda config --set always_yes yes --set changeps1 no | ||
- conda update -q conda | ||
- conda info -a | ||
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION | ||
- source activate test-environment | ||
- export LD_LIBRARY_PATH=$HOME/miniconda/envs/test-environment/lib/:$LD_LIBRARY_PATH | ||
- pip install --upgrade pip | ||
- pip install -r requirements.txt | ||
- pip install -r requirements-dev.txt | ||
- pip install coveralls | ||
before_script: | ||
- bash lint.sh | ||
script: | ||
- bash test.sh | ||
- ./test.sh | ||
after_success: | ||
coveralls | ||
notifications: | ||
webhooks: https://coveralls.io/webhook |
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 +1,3 @@ | ||
from .drop_block import DropBlock1D, DropBlock2D | ||
|
||
__version__ = '0.5.0' |
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,33 @@ | ||
import os | ||
from distutils.util import strtobool | ||
|
||
__all__ = [ | ||
'keras', 'utils', 'activations', 'applications', 'backend', 'datasets', | ||
'layers', 'preprocessing', 'wrappers', 'callbacks', 'constraints', 'initializers', | ||
'metrics', 'models', 'losses', 'optimizers', 'regularizers', 'TF_KERAS', | ||
] | ||
|
||
TF_KERAS = strtobool(os.environ.get('TF_KERAS', '0')) | ||
|
||
if TF_KERAS: | ||
import tensorflow as tf | ||
keras = tf.keras | ||
else: | ||
import keras | ||
|
||
utils = keras.utils | ||
activations = keras.activations | ||
applications = keras.applications | ||
backend = keras.backend | ||
datasets = keras.datasets | ||
layers = keras.layers | ||
preprocessing = keras.preprocessing | ||
wrappers = keras.wrappers | ||
callbacks = keras.callbacks | ||
constraints = keras.constraints | ||
initializers = keras.initializers | ||
metrics = keras.metrics | ||
models = keras.models | ||
losses = keras.losses | ||
optimizers = keras.optimizers | ||
regularizers = keras.regularizers |
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,3 +1,7 @@ | ||
setuptools>=38.6.0 | ||
twine>=1.11.0 | ||
wheel>=0.31.0 | ||
nose | ||
tensorflow | ||
pycodestyle | ||
coverage |
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,2 +1,3 @@ | ||
#!/usr/bin/env bash | ||
nosetests --with-coverage --cover-html --cover-html-dir=htmlcov --cover-package="keras_drop_block" tests | ||
pycodestyle --max-line-length=120 keras_drop_block tests && \ | ||
nosetests --with-coverage --cover-html --cover-html-dir=htmlcov --cover-package=keras_drop_block tests |
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