-
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.
- Loading branch information
1 parent
ef1a41a
commit 44f5e54
Showing
4 changed files
with
74 additions
and
30 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
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,6 +1,24 @@ | ||
import pytest | ||
|
||
from autokeras.stub import * | ||
from tests.common import get_add_skip_model, get_concat_skip_model | ||
|
||
|
||
def test_to_stub_model(): | ||
# TODO: Implement | ||
pass | ||
model = get_add_skip_model() | ||
stub_model = to_stub_model(model) | ||
assert len(stub_model.layers) == 18 | ||
|
||
|
||
def test_to_stub_model2(): | ||
model = get_concat_skip_model() | ||
stub_model = to_stub_model(model) | ||
assert len(stub_model.layers) == 18 | ||
|
||
|
||
def test_to_stub_model_exception(): | ||
model = get_concat_skip_model() | ||
stub_model = to_stub_model(model) | ||
with pytest.raises(Exception) as e: | ||
to_stub_model(stub_model) | ||
assert e.type is TypeError |