This file contains hidden or 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 | |
import torch.nn as nn | |
import torch.nn.functional as F | |
class Model(nn.Module): | |
def __init__(self): | |
super(Model, self).__init__() | |
# self.conv1 = nn.Conv2d(1, 31, 3, 2) | |
self.bn1 = nn.BatchNorm2d(1) | |
def forward(self, x): |
This file contains hidden or 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 | |
import torch.nn as nn | |
class Model(nn.Module): | |
def __init__(self): | |
super(Model, self).__init__() | |
def forward(self, x): | |
y = torch.sigmoid(x + x * x) | |
return y |
This file contains hidden or 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 | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import torchvision as vision | |
class XlaMNIST(nn.Module): | |
def __init__(self): | |
super(XlaMNIST, self).__init__() | |
# self.conv1 = nn.Conv2d(1, 10, kernel_size=5) | |
# self.conv2 = nn.Conv2d(10, 20, kernel_size=5) |
This file contains hidden or 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 | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import torchvision as vision | |
class XlaMNIST(nn.Module): | |
def __init__(self): | |
super(XlaMNIST, self).__init__() | |
def forward(self, x): |
This file contains hidden or 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 | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import torchvision as vision | |
class XlaMNIST(nn.Module): | |
def __init__(self): | |
super(XlaMNIST, self).__init__() | |
self.conv1 = nn.Conv2d(1, 10, kernel_size=5) | |
self.conv2 = nn.Conv2d(10, 20, kernel_size=5) |
This file contains hidden or 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 nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04 | |
WORKDIR /packages | |
RUN apt-get update --fix-missing && \ | |
apt-get install -y cmake git wget bzip2 ca-certificates curl software-properties-common && \ | |
add-apt-repository ppa:ubuntu-toolchain-r/test && \ | |
apt-get update && \ | |
apt-get install -y gcc-7 libgfortran4 && \ | |
apt-get clean |
This file contains hidden or 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
graph(%0 : Float(4, 3, 224, 224) | |
%1 : Float(64, 3, 7, 7) | |
%2 : Float(64) | |
%3 : Float(64) | |
%4 : Float(64) | |
%5 : Float(64) | |
%6 : Long() | |
%7 : Float(64, 64, 1, 1) | |
%8 : Float(64) | |
%9 : Float(64) |
This file contains hidden or 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 __future__ import print_function | |
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
from torchvision import datasets, transforms | |
class Net(nn.Module): | |
def __init__(self): | |
super(Net, self).__init__() | |
self.conv1 = nn.Conv2d(1, 10, kernel_size=5) |
This file contains hidden or 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
conda uninstall --force pillow -y | |
# install libjpeg-turbo to $HOME/turbojpeg | |
git clone https://github.com/libjpeg-turbo/libjpeg-turbo | |
pushd libjpeg-turbo | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_INSTALL_PREFIX:PATH=$HOME/turbojpeg | |
make | |
make install |
This file contains hidden or 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
================================================================================ | |
General dependencies | |
================================================================================ | |
libc.so.6[0m imported symbols from: | |
python[0m | |
ld-linux-x86-64.so.2[0m | |
libpthread.so.0[0m | |
sh[0m | |
libm.so.6[0m imported symbols from: | |
libc.so.6[0m |