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
using Flux | |
using Zygote | |
using MLDatasets | |
using LSHFunctions | |
using DataStructures | |
using Plots; | |
using Profile; | |
using StatProfilerHTML; | |
using LinearAlgebra; |
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 numpy as np | |
from scipy import ndimage | |
# NOTE | |
# Images are assumed to be uint8 0-255 valued. | |
# For augment function: | |
# images shape: (batch_size, height, width, channels=3) | |
# labels shape: (batch_size, 3) | |
def addBlotch(image, max_dims=[0.2,0.2]): |