Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Commit

Permalink
add tests for chapters 5, 6, 7
Browse files Browse the repository at this point in the history
  • Loading branch information
keon committed Sep 2, 2019
1 parent d9cef78 commit f565cc9
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
27 changes: 27 additions & 0 deletions test/test_05.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import sys
import os
from importlib import import_module


# setup path
chapter_name = "05-이미지_처리능력이_탁월한_CNN"
dir_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), ".." , chapter_name)
sys.path.append(dir_path)



def test_chapter_exmaples():
mydir_tmp = os.path.join(dir_path) # add the testA folder name
mydir_new = os.chdir(mydir_tmp) # change the current working directory
mydir = os.getcwd() # set the main directory again, now it calls testA

chapter_examples = [
"cnn",
"resnet",
]

for example in chapter_examples:
imported_package = import_module(example)

if __name__ == "__main__":
test_chapter_exmaples()
27 changes: 27 additions & 0 deletions test/test_06.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import sys
import os
from importlib import import_module


# setup path
chapter_name = "06-사람의_지도_없이_학습하는_Autoencoder"
dir_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), ".." , chapter_name)
sys.path.append(dir_path)



def test_chapter_exmaples():
mydir_tmp = os.path.join(dir_path) # add the testA folder name
mydir_new = os.chdir(mydir_tmp) # change the current working directory
mydir = os.getcwd() # set the main directory again, now it calls testA

chapter_examples = [
"basic_autoencoder",
"denoising_autoencoder",
]

for example in chapter_examples:
imported_package = import_module(example)

if __name__ == "__main__":
test_chapter_exmaples()
27 changes: 27 additions & 0 deletions test/test_07.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import sys
import os
from importlib import import_module


# setup path
chapter_name = "07-순차적인_데이터를_처리하는_RNN"
dir_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), ".." , chapter_name)
sys.path.append(dir_path)



def test_chapter_exmaples():
mydir_tmp = os.path.join(dir_path) # add the testA folder name
mydir_new = os.chdir(mydir_tmp) # change the current working directory
mydir = os.getcwd() # set the main directory again, now it calls testA

chapter_examples = [
"text_classification",
"sequence_to_sequence",
]

for example in chapter_examples:
imported_package = import_module(example)

if __name__ == "__main__":
test_chapter_exmaples()

0 comments on commit f565cc9

Please sign in to comment.