diff --git a/.gitignore b/.gitignore index 0069147..2a4b58b 100644 --- a/.gitignore +++ b/.gitignore @@ -117,3 +117,5 @@ dmypy.json # Pyre type checker .pyre/ + +.vscode \ No newline at end of file diff --git a/README.md b/README.md index b6aa876..a2365e4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # ADDA.PyTorch implement Adversarial Discriminative Domain Adapation in PyTorch +This repo is mostly based on https://github.com/Fujiki-Nakamura/ADDA.PyTorch ## Example ``` @@ -8,7 +9,6 @@ $ python train_source.py --logdir outputs $ python main.py --logdir outputs --trained outputs/best_model.pt --slope 0.2 ``` - ## Result ### SVHN -> MNIST | | Paper | This Repro | @@ -21,3 +21,4 @@ $ python main.py --logdir outputs --trained outputs/best_model.pt --slope 0.2 ## Resource - https://arxiv.org/pdf/1702.05464.pdf +- https://github.com/Fujiki-Nakamura/ADDA.PyTorch diff --git a/adversarial.png b/adversarial.png deleted file mode 100644 index 279c0f8..0000000 Binary files a/adversarial.png and /dev/null differ diff --git a/altutils.py b/altutils.py new file mode 100644 index 0000000..1c22525 --- /dev/null +++ b/altutils.py @@ -0,0 +1,33 @@ +import configparser +import logging + + +def readConfigFile(filePath): + """ + Read config file + + Args: + filePath ([str]): path to config file + + Returns: + [Obj]: config object + """ + config = configparser.ConfigParser() + config.read(filePath) + return config + + +def setLogger(logFilePath): + """ + Set logger + + Args: + logFilePath ([str]): path to log file + + Returns: + [obj]: logger object + """ + logHandler = [logging.FileHandler(logFilePath), logging.StreamHandler()] + logging.basicConfig(level=logging.INFO, format="%(asctime)s %(message)s", handlers=logHandler) + logger = logging.getLogger() + return logger \ No newline at end of file diff --git a/target_domain.png b/target_domain.png deleted file mode 100644 index fb7705d..0000000 Binary files a/target_domain.png and /dev/null differ