-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
64 additions
and
17 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 |
---|---|---|
|
@@ -8,17 +8,16 @@ | |
|
||
setup( | ||
name='autokeras', | ||
version='1.0.1', | ||
version='1.0.2', | ||
description='AutoML for deep learning', | ||
package_data={'': ['README.md']}, | ||
long_description=readme.read_text(encoding='utf-8'), | ||
long_description_content_type='text/markdown', | ||
author='Data Analytics at Texas A&M (DATA) Lab, Keras Team', | ||
author_email='[email protected]', | ||
url='http://autokeras.com', | ||
download_url='https://github.com/keras-team/autokeras/archive/1.0.1.tar.gz', | ||
keywords=['AutoML', 'keras'], | ||
# TODO: Do not install tensorflow if tensorflow-gpu is installed. | ||
download_url='https://github.com/keras-team/autokeras/archive/1.0.2.tar.gz', | ||
keywords=['AutoML', 'Keras'], | ||
install_requires=[ | ||
'packaging', | ||
'keras-tuner>=1.0.1', | ||
|
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,48 @@ | ||
import copy | ||
|
||
import kerastuner | ||
import tensorflow as tf | ||
|
||
import autokeras as ak | ||
from autokeras import graph as graph_module | ||
from autokeras.tuners import task_specific | ||
|
||
|
||
def check_initial_hp(initial_hp, graph): | ||
hp = kerastuner.HyperParameters() | ||
hp.values = copy.copy(initial_hp) | ||
graph.build(hp) | ||
assert hp.values == initial_hp | ||
|
||
|
||
def test_image_classifier_tuner0(): | ||
tf.keras.backend.clear_session() | ||
input_node = ak.ImageInput(shape=(32, 32, 3)) | ||
output_node = ak.ImageBlock()(input_node) | ||
output_node = ak.ClassificationHead( | ||
loss='categorical_crossentropy', | ||
output_shape=(10,))(output_node) | ||
graph = graph_module.Graph(input_node, output_node) | ||
check_initial_hp(task_specific.IMAGE_CLASSIFIER[0], graph) | ||
|
||
|
||
def test_image_classifier_tuner1(): | ||
tf.keras.backend.clear_session() | ||
input_node = ak.ImageInput(shape=(32, 32, 3)) | ||
output_node = ak.ImageBlock()(input_node) | ||
output_node = ak.ClassificationHead( | ||
loss='categorical_crossentropy', | ||
output_shape=(10,))(output_node) | ||
graph = graph_module.Graph(input_node, output_node) | ||
check_initial_hp(task_specific.IMAGE_CLASSIFIER[1], graph) | ||
|
||
|
||
def test_text_classifier_tuner0(): | ||
tf.keras.backend.clear_session() | ||
input_node = ak.TextInput(shape=(1,)) | ||
output_node = ak.TextBlock()(input_node) | ||
output_node = ak.ClassificationHead( | ||
loss='categorical_crossentropy', | ||
output_shape=(10,))(output_node) | ||
graph = graph_module.Graph(input_node, output_node) | ||
check_initial_hp(task_specific.TEXT_CLASSIFIER[0], graph) |