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 torch | |
from torch import nn as ptnn | |
from torch.autograd import Variable | |
import mxnet as mx | |
from mxnet.gluon import nn as mxnn | |
from mxnet import nd, initializer | |
from enum import IntEnum | |
from time import time | |
use_cuda = torch.cuda.is_available() |
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
from collections import OrderedDict | |
import torch as th | |
import torch.nn as nn | |
from torch.autograd import Variable | |
from torch.nn import Parameter | |
fmt = ' {:<20} {:>15} {:>15} {:>10}' | |
def stringify_shape(shape): |
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
FROM ubuntu:16.04 | |
RUN apt-get update && apt-get install -y --no-install-recommends \ | |
ca-certificates \ | |
apt-transport-https \ | |
openjdk-8-jre-headless \ | |
curl \ | |
xz-utils \ | |
unzip \ | |
bzip2 \ |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<script src="main.js"></script> | |
<meta charset="UTF-8"> | |
<title>Tutorial</title> | |
<style> | |
html, body { | |
margin: 0; | |
padding: 0; |
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
#!/usr/bin/env bash | |
# For opening a file from the heads up display of Figwheel in IntelliJ IDEA | |
# Made for OS X but should work similarly on Linux with a different CMD variable | |
# Add this script to your path (ex. ~/bin) and use from | |
# :open-file-command in the :figwheel section of project.clj | |
INTELLIJ_VERSION=14 # Change for your (whole number) version of IntelliJ IDEA | |
CMD="/Applications/IntelliJ IDEA ${INTELLIJ_VERSION}.app/Contents/MacOS/idea" | |
"$CMD" "$PWD" --line $2 "$PWD/$1" |