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
import os | |
def mkdir(path): | |
""" | |
Args: | |
path: Path where directory will be created | |
Returns: Nothing. Creates directory with the path specified |
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
from PIL import Image | |
def center_crop(image): | |
# crop to ratio, center | |
w, h = image.size | |
w_center = w/2 | |
h_center = h/2 |
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
version: 2 | |
jobs: | |
test: | |
docker: | |
- image: python:3.7 | |
steps: | |
- run: | |
name: Run tests | |
command: | | |
pip install virtualenv |
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
version: 2 | |
jobs: | |
test: | |
docker: | |
- image: python:3.7 | |
parallelism: 4 | |
steps: | |
- run: | |
name: Run tests | |
parallel: true |
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
version: 2 | |
jobs: | |
test: | |
docker: | |
- image: python:3.7 | |
parallelism: 4 | |
steps: | |
- run: | |
name: Run tests | |
parallel: true |
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
# FCN Model | |
def create_model(num_classes=10, input_shape=None, dropout_ratio=None): | |
model = Sequential() | |
if input_shape is None: | |
model.add(Input(shape=(None, None, 1))) | |
else: | |
model.add(Input(shape=input_shape)) | |
model.add(Conv2D(filters=16, kernel_size=(2, 4), activation='relu')) | |
model.add(MaxPooling2D(pool_size=(2, 3))) | |
model.add(Conv2D(filters=32, kernel_size=(2, 4), activation='relu')) |