Skip to content

Instantly share code, notes, and snippets.

@stsievert
stsievert / Centralized-PS.ipynb
Last active December 6, 2023 23:44
PyTorch MNIST parameter server
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stsievert
stsievert / SSreset.py
Last active September 25, 2022 11:39
clear all variables/reset for Spyder
from IPython import get_ipython
def __reset__(): get_ipython().magic('reset -sf')
@stsievert
stsievert / PyTorch-autoencoder.ipynb
Last active February 14, 2022 21:20
PyTorch MNIST autoencoder
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stsievert
stsievert / Hyperband-example.ipynb
Last active October 23, 2020 11:59
Hyperband demo with sklearn
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stsievert
stsievert / Criteo.ipynb
Last active January 27, 2020 14:16
Criteo dataset example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stsievert
stsievert / fftconv-conv-timings-2d.ipynb
Created July 24, 2019 16:39
constant timing for convolution methods (fft and direct)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stsievert
stsievert / timing.ipynb
Created April 15, 2019 13:34
Tornado yielding list
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stsievert
stsievert / _Hyperband-example.ipynb
Last active April 14, 2019 23:12
Hyperparameter comparisons (with successive halving, hyperband, stop on plateau and passive random sampling)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="expires" content="0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</head>
import numpy as np
from scipy.signal import convolve
def test(type1, type2):
np.random.seed(42)
n = 3000
if 'int' in type1 or 'bool' in type1:
x1 = np.random.choice([0, 1], size=n).astype(type1)
else:
x1 = np.random.randn(n).astype(type1)