Skip to content

Instantly share code, notes, and snippets.

View dblalock's full-sized avatar

dblalock

View GitHub Profile
@dblalock
dblalock / gemms.py
Created August 1, 2023 02:01
block diagonal matmul
from typing import * # for convenience; also, this is valid for typing
import warnings
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch import Tensor # shorten type signatures
# def try_compile(f: Callable):
# def try_compile():
@dblalock
dblalock / composition-papers.md
Last active June 14, 2023 16:32
Machine learning papers/articles that combine many small improvements together

Papers

Revisiting ResNets: Improved Training and Scaling Strategies

Bello, Irwan, William Fedus, Xianzhi Du, Ekin D. Cubuk, Aravind Srinivas, Tsung-Yi Lin, Jonathon Shlens, and Barret Zoph. "Revisiting resnets: Improved training and scaling strategies." arXiv preprint arXiv:2103.07579 (2021).

@article{bello2021revisiting,
  title={Revisiting resnets: Improved training and scaling strategies},
  author={Bello, Irwan and Fedus, William and Du, Xianzhi and Cubuk, Ekin D and Srinivas, Aravind and Lin, Tsung-Yi and Shlens, Jonathon and Zoph, Barret},
  journal={arXiv preprint arXiv:2103.07579},
@dblalock
dblalock / maf9wlfhomfxawva
Created September 14, 2021 20:50
maf9wlfhomfxawva
import numpy as np
np.random.seed(1234)
class FullyConnectedLayer(object):
def __init__(self, num_inputs, num_outputs):
pass
@dblalock
dblalock / ML Meta-analyses.md
Last active November 28, 2023 14:50
List of meta-analyses / independent benchmarking of machine learning and data mining papers
@dblalock
dblalock / conda-research-env-py27.yml
Created February 26, 2019 20:23
Environment config file for Scipy stack + Keras GPU with miniconda. Tested on ubuntu 16.0.4 LTS.
name: tf27
channels:
- pytorch
- defaults
dependencies:
- python=2.7
- tensorflow-gpu=1.12.*
- keras
- numpy
- pandas

Keybase proof

I hereby claim:

  • I am dblalock on github.
  • I am dblalock (https://keybase.io/dblalock) on keybase.
  • I have a public key ASArwQtIhdozJpppmdhAOiJHgd-DmtilH9vzvxNo_0vazQo

To claim this, I am signing this object:

@dblalock
dblalock / pyience.py
Created September 4, 2017 22:33
Tools for running experiments
#!/bin/env/python
"""utility functions for running experiments"""
import datetime
import os
import itertools
import warnings
import numpy as np
@dblalock
dblalock / align.c
Created August 30, 2017 22:11
C / C++ portable aligned memory allocation
/* Allocate aligned memory in a portable way.
*
* Memory allocated with aligned alloc *MUST* be freed using aligned_free.
*
* @param alignment The number of bytes to which memory must be aligned. This
* value *must* be <= 255.
* @param bytes The number of bytes to allocate.
* @param zero If true, the returned memory will be zeroed. If false, the
* contents of the returned memory are undefined.
* @returns A pointer to `size` bytes of memory, aligned to an `alignment`-byte
@dblalock
dblalock / selected_msgs_to_urls.scpt
Created September 5, 2016 03:20
Creates markdown links to the currently selected Apple Mail messages and copies them to the clipboard
--E.g., if you have a message selected that has subject and body:
-- Subj: Meeting about the Foo!
-- Body: whatever
--Running this script copies to the clipboard the string:
-- [Meeting about the Foo!](message://<some message id>)
--If you click on the resulting url, the message opens in Mail
--
--Basically, this is for getting links to emails into a todo list / task manager
--based on https://www.macstories.net/tutorials/send-selected-mail-message-to-evernote-with-source-url/
@dblalock
dblalock / svnDeleteMissingFiles.sh
Created July 18, 2014 19:48
svn delete missing files
svn rm $( svn status | sed -e '/^!/!d' -e 's/^!//' )
# note that this won't work if there's whitespace in the filenames
# http://stackoverflow.com/a/9600437/1153180