Skip to content

Commit

Permalink
Rename files/folders for better structure
Browse files Browse the repository at this point in the history
  • Loading branch information
herbiebradley committed Mar 15, 2019
1 parent f4a1b32 commit 342af65
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ target/
.ipynb_checkpoints/

# exclude data from source control by default
/data/
/datasets/
/saved_models/
# Mac OS-specific storage files
.DS_Store
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#################################################################################

PROJECT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
BUCKET = [OPTIONAL] your-bucket-for-syncing-data (do not include 's3:https://')
PROFILE = default
PROJECT_NAME = CycleGAN-Tensorflow
PYTHON_INTERPRETER = python3
Expand All @@ -27,7 +26,7 @@ requirements: test_environment

## Make Dataset
data: requirements
$(PYTHON_INTERPRETER) src/data/make_dataset.py
$(PYTHON_INTERPRETER) src/data/download_data.py

## Delete all compiled Python files
clean:
Expand Down
23 changes: 10 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,30 @@ Project Organization
├── LICENSE
├── Makefile <- Makefile with commands like `make data` or `make train`
├── README.md
├── data
│   └── raw <- Raw data before any processing.
├── datasets <- All datasets are stored here
├── saved_models <- Checkpointed models and tensorboard summaries.
├── saved_models <- Checkpointed models and tensorboard summaries
├── setup.py <- makes project pip installable (pip install -e .) so src can be imported
└── src <- Source code for use in this project.
└── src <- Source code for use in this project
   ├── __init__.py <- Makes src a Python module
├── train.py <- Run this to train.
├── train.py <- Run this to train
├── test.py <- Run this to test.
├── test.py <- Run this to test
   ├── pipeline <- Code for downloading or loading data
   ├── data <- Code for downloading or loading data
   │   ├── data.py
   │   └── download_data.py
   ├── options <- Files for command line options
   │   └── base_options.py
   ├── models <- Code for defining the network structure and loss functions
│   ├── __init__.py <- model helper functions
│   ├── __init__.py
   │   ├── network.py
│   ├── cyclegan.py
│   ├── cyclegan.py <- CycleGAN model class
   │   └── losses.py
   └── utils <- Utility files, including scripts for visualisation
   └── utils <- Utility files
   ├── options.py <- File for command line options
      └── image_history_buffer.py

--------
Expand Down
Empty file removed references/.gitkeep
Empty file.
Empty file removed reports/.gitkeep
Empty file.
Empty file removed reports/figures/.gitkeep
Empty file.
14 changes: 6 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
from setuptools import find_packages, setup

setup(
name='src',
packages=find_packages(),
version='0.1.0',
description='A Tensorflow implementation of CycleGAN using Eager Execution, tf.keras.layers, and tf.data.',
author='Herbie Bradley',
license='MIT',
)
setup(name='src',
packages=find_packages(),
version='0.1.0',
description='A Tensorflow implementation of CycleGAN using Eager Execution, tf.keras.layers, and tf.data.',
author='Herbie Bradley',
license='MIT')
File renamed without changes.
File renamed without changes.
12 changes: 4 additions & 8 deletions src/pipeline/download_data.py → src/data/download_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,10 @@ def download_data(dataset_id, download_location):

if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument(
"--dataset_id",
type=str,
default="horse2zebra",
help="String identifying the dataset to download. For example, \
'horse2zebra', 'monet2photo', 'summer2winter_yosemite', 'apple2orange', etc")
FLAGS, unparsed = parser.parse_known_args()
parser.add_argument("--dataset_id", type=str, default="horse2zebra", help="String identifying the dataset to download. For example, \
'horse2zebra', 'monet2photo', 'summer2winter_yosemite', 'apple2orange', etc")
opt = parser.parse_args()
project_dir = os.path.abspath(os.path.join(os.getcwd(), os.pardir, os.pardir))
raw_data = os.path.join(project_dir, 'data', 'raw')
download_data(FLAGS.dataset_id, download_location=raw_data)
download_data(opt.dataset_id, download_location=raw_data)
# TODO: Add code to check if dataset is already there.
Empty file removed src/pipeline/__init__.py
Empty file.

0 comments on commit 342af65

Please sign in to comment.