Skip to content

Instantly share code, notes, and snippets.

View outlace's full-sized avatar

Brandon B outlace

View GitHub Profile
@outlace
outlace / data_augmentation.py
Created April 12, 2017 04:44
Augments data for machine learning. Takes images in numpy format and randomly applies minor transformations to amplify image data.
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]):
@outlace
outlace / slide.jl
Created September 7, 2021 22:02
Julia prototype implementation of Sub-linear Deep Learning Engine (SLIDE); missing advanced hash table updating and other optimizations
using Flux
using Zygote
using MLDatasets
using LSHFunctions
using DataStructures
using Plots;
using Profile;
using StatProfilerHTML;
using LinearAlgebra;