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 46
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
0 parents
commit 8dd11f8
Showing
19 changed files
with
365 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: bug | ||
assignees: CyberZHG | ||
|
||
--- | ||
|
||
**Describe the Bug** | ||
|
||
A clear and concise description of what the bug is. | ||
|
||
**Version Info** | ||
|
||
* [ ] I'm using the latest version | ||
|
||
**Minimal Codes To Reproduce** | ||
|
||
```python | ||
import keras_radam | ||
|
||
pass | ||
``` |
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,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: enhancement | ||
assignees: CyberZHG | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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,10 @@ | ||
--- | ||
name: Question | ||
about: Ask questions about the repo | ||
title: '' | ||
labels: question | ||
assignees: '' | ||
|
||
--- | ||
|
||
|
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,2 @@ | ||
daysUntilStale: 5 | ||
daysUntilClose: 2 |
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,116 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
|
||
# System thumbnail | ||
.DS_Store | ||
|
||
# IDE | ||
.idea | ||
|
||
# Images | ||
*.png | ||
|
||
# Models | ||
*.h5 |
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,30 @@ | ||
dist: xenial | ||
language: python | ||
python: | ||
- 3.6 | ||
env: | ||
- KERAS_BACKEND=tensorflow | ||
- KERAS_BACKEND=tensorflow TF_KERAS=1 | ||
- KERAS_BACKEND=tensorflow TF_KERAS=1 TF_EAGER=1 | ||
- KERAS_BACKEND=tensorflow TF_KERAS=1 TF_2=1 | ||
# - KERAS_BACKEND=theano THEANO_FLAGS=optimizer=fast_compile | ||
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 | ||
- if [[ $TF_2 == "1" ]]; then pip install tensorflow==2.0.0-beta1; fi | ||
- if [[ $KERAS_BACKEND == "theano" ]]; then pip install theano && conda install mkl mkl-service; fi | ||
- pip install coveralls | ||
script: | ||
- ./test.sh | ||
after_success: | ||
coveralls |
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,7 @@ | ||
# Changelog | ||
|
||
## [Unreleased] | ||
|
||
## [0.0.0] - 2077-07-07 | ||
|
||
### Added |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 Zhao HG | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,4 @@ | ||
include README.md | ||
include README-zh-CN.md | ||
include CHANGELOG.md | ||
include requirements.txt |
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,23 @@ | ||
# Keras RAdam | ||
|
||
[![Travis](https://travis-ci.org/CyberZHG/keras-radam.svg)](https://travis-ci.org/CyberZHG/keras-radam) | ||
[![Coverage](https://coveralls.io/repos/github/CyberZHG/keras-radam/badge.svg?branch=master)](https://coveralls.io/github/CyberZHG/keras-radam) | ||
[![Version](https://img.shields.io/pypi/v/keras-rectified-adam.svg)](https://pypi.org/project/keras-rectified-adam/) | ||
![Downloads](https://img.shields.io/pypi/dm/keras-rectified-adam.svg) | ||
![License](https://img.shields.io/pypi/l/keras-rectified-adam.svg) | ||
|
||
![](https://img.shields.io/badge/keras-tensorflow-blue.svg) | ||
![](https://img.shields.io/badge/keras-theano-blue.svg) | ||
![](https://img.shields.io/badge/keras-tf.keras-blue.svg) | ||
![](https://img.shields.io/badge/keras-tf.keras/eager-blue.svg) | ||
![](https://img.shields.io/badge/keras-tf.keras/2.0_beta-blue.svg) | ||
|
||
\[[中文](https://github.com/CyberZHG/keras-radam/blob/master/README.zh-CN.md)|[English](https://github.com/CyberZHG/keras-radam/blob/master/README.md)\] | ||
|
||
## Install | ||
|
||
```bash | ||
pip install keras-rectified-adam | ||
``` | ||
|
||
## Usage |
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,23 @@ | ||
# Keras RAdam | ||
|
||
[![Travis](https://travis-ci.org/CyberZHG/keras-radam.svg)](https://travis-ci.org/CyberZHG/keras-radam) | ||
[![Coverage](https://coveralls.io/repos/github/CyberZHG/keras-radam/badge.svg?branch=master)](https://coveralls.io/github/CyberZHG/keras-radam) | ||
[![Version](https://img.shields.io/pypi/v/keras-radam.svg)](https://pypi.org/project/keras-radam/) | ||
![Downloads](https://img.shields.io/pypi/dm/keras-radam.svg) | ||
![License](https://img.shields.io/pypi/l/keras-radam.svg) | ||
|
||
![](https://img.shields.io/badge/keras-tensorflow-blue.svg) | ||
![](https://img.shields.io/badge/keras-theano-blue.svg) | ||
![](https://img.shields.io/badge/keras-tf.keras-blue.svg) | ||
![](https://img.shields.io/badge/keras-tf.keras/eager-blue.svg) | ||
![](https://img.shields.io/badge/keras-tf.keras/2.0_beta-blue.svg) | ||
|
||
\[[中文](https://github.com/CyberZHG/keras-radam/blob/master/README.zh-CN.md)|[English](https://github.com/CyberZHG/keras-radam/blob/master/README.md)\] | ||
|
||
## 安装 | ||
|
||
```bash | ||
pip install keras-radam | ||
``` | ||
|
||
## 使用 |
Empty file.
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,42 @@ | ||
import os | ||
|
||
__all__ = [ | ||
'keras', 'utils', 'activations', 'applications', 'backend', 'datasets', 'engine', | ||
'layers', 'preprocessing', 'wrappers', 'callbacks', 'constraints', 'initializers', | ||
'metrics', 'models', 'losses', 'optimizers', 'regularizers', 'TF_KERAS', 'EAGER_MODE' | ||
] | ||
|
||
TF_KERAS = False | ||
EAGER_MODE = False | ||
|
||
if os.environ.get('TF_KERAS', '0') != '0': | ||
import tensorflow as tf | ||
from tensorflow.python import keras | ||
TF_KERAS = True | ||
if os.environ.get('TF_EAGER', '0') != '0': | ||
try: | ||
tf.enable_eager_execution() | ||
raise AttributeError() | ||
except AttributeError as e: | ||
pass | ||
EAGER_MODE = tf.executing_eagerly() | ||
else: | ||
import keras | ||
|
||
utils = keras.utils | ||
activations = keras.activations | ||
applications = keras.applications | ||
backend = keras.backend | ||
datasets = keras.datasets | ||
engine = keras.engine | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env bash | ||
rm -rf dist/* && python3 setup.py sdist && twine upload dist/* |
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,7 @@ | ||
setuptools>=38.6.0 | ||
twine>=1.11.0 | ||
wheel>=0.31.0 | ||
tensorflow | ||
nose | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
numpy | ||
Keras |
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,29 @@ | ||
import codecs | ||
from setuptools import setup, find_packages | ||
|
||
with codecs.open('README.md', 'r', 'utf8') as reader: | ||
long_description = reader.read() | ||
|
||
|
||
with codecs.open('requirements.txt', 'r', 'utf8') as reader: | ||
install_requires = list(map(lambda x: x.strip(), reader.readlines())) | ||
|
||
|
||
setup( | ||
name='keras-rectified-adam', | ||
version='0.0.0', | ||
packages=find_packages(), | ||
url='https://github.com/CyberZHG/keras-radam', | ||
license='MIT', | ||
author='CyberZHG', | ||
author_email='CyberZHG@users.noreply.github.com', | ||
description='RAdam implemented in Keras', | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
install_requires=install_requires, | ||
classifiers=( | ||
"Programming Language :: Python :: 3.6", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
), | ||
) |
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,3 @@ | ||
#!/usr/bin/env bash | ||
pycodestyle --max-line-length=120 keras_radam tests && \ | ||
nosetests --nocapture --with-coverage --cover-erase --cover-html --cover-html-dir=htmlcov --cover-package=keras_radam --with-doctest |
Empty file.