Skip to content

Instantly share code, notes, and snippets.

@mikehamer
mikehamer / pytorch_custom_backward.cpp
Created April 9, 2019 13:28
An example of using the PyTorch C++ API to implement a custom forward and backward function
// An example of using the PyTorch C++ API to implement a custom forward and backward function
#include <iostream>
#include <vector>
#include <torch/torch.h>
#include <torch/csrc/autograd/variable.h>
#include <torch/csrc/autograd/function.h>
#include <torch/csrc/autograd/VariableTypeUtils.h>
#include <torch/csrc/autograd/functions/utils.h>
@mikehamer
mikehamer / gist:e4964935042e029c7c32
Last active July 19, 2018 07:33
OSX Yosemite Setup Script
#!/bin/bash
brews=(
coreutils
findutils
archey
bash
caskroom/cask/brew-cask
dfc
git