Skip to content

Instantly share code, notes, and snippets.

@NTT123
Created October 11, 2018 05:05
Show Gist options
  • Save NTT123/ecdac1c66b04c83fcc309fa2f93bf734 to your computer and use it in GitHub Desktop.
Save NTT123/ecdac1c66b04c83fcc309fa2f93bf734 to your computer and use it in GitHub Desktop.
Highway network.ipynb
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "Highway network.ipynb",
"version": "0.3.2",
"provenance": [],
"collapsed_sections": [],
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"accelerator": "GPU"
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"[View in Colaboratory](https://colab.research.google.com/gist/NTT123/ecdac1c66b04c83fcc309fa2f93bf734/highway-network.ipynb)"
]
},
{
"metadata": {
"id": "YXdzZAsrZEzY",
"colab_type": "text"
},
"cell_type": "markdown",
"source": [
"# Training Very Deep Networks\n",
"Rupesh Kumar Srivastava, Klaus Greff, Jürgen Schmidhuber\n",
"https://arxiv.org/abs/1507.06228"
]
},
{
"metadata": {
"id": "HjxGMdJy8rRn",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 54
},
"outputId": "7176bed0-6fd6-4a2f-fd2e-6337c9433cb1"
},
"cell_type": "code",
"source": [
"# http://pytorch.org/\n",
"from os import path\n",
"from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag\n",
"platform = '{}{}-{}'.format(get_abbr_impl(), get_impl_ver(), get_abi_tag())\n",
"\n",
"accelerator = 'cu80' if path.exists('/opt/bin/nvidia-smi') else 'cpu'\n",
"\n",
"!pip install -q http://download.pytorch.org/whl/{accelerator}/torch-0.4.1-{platform}-linux_x86_64.whl torchvision\n",
"import torch"
],
"execution_count": 1,
"outputs": [
{
"output_type": "stream",
"text": [
"tcmalloc: large alloc 1073750016 bytes == 0x560ee000 @ 0x7ff0c05321c4 0x46d6a4 0x5fcbcc 0x4c494d 0x54f3c4 0x553aaf 0x54e4c8 0x54f4f6 0x553aaf 0x54efc1 0x54f24d 0x553aaf 0x54efc1 0x54f24d 0x553aaf 0x54efc1 0x54f24d 0x551ee0 0x54e4c8 0x54f4f6 0x553aaf 0x54efc1 0x54f24d 0x551ee0 0x54efc1 0x54f24d 0x551ee0 0x54e4c8 0x54f4f6 0x553aaf 0x54e4c8\n"
],
"name": "stdout"
}
]
},
{
"metadata": {
"id": "WZ2kb7mI8t75",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"import torch\n",
"import torch.nn as nn\n",
"import torch.nn.functional as F\n",
"import torch.optim as optim\n",
"import torchvision\n",
"from torchvision import datasets, transforms\n"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "OoRDDwXR80Oz",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"import torch\n",
"import torchvision.transforms as transforms\n"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "2W9yv1LN9kQJ",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 119
},
"outputId": "7b6da2e4-103d-49ff-d5df-493b04cdcb3c"
},
"cell_type": "code",
"source": [
"transform = transforms.Compose(\n",
" [transforms.ToTensor(),\n",
" transforms.Normalize((0.1307,), (0.3081,))])\n",
"\n",
"trainset = torchvision.datasets.MNIST(root='./data', train=True,\n",
" download=True, transform=transform)\n",
"trainloader = torch.utils.data.DataLoader(trainset, batch_size=32,\n",
" shuffle=True, num_workers=2)\n",
"\n",
"testset = torchvision.datasets.MNIST(root='./data', train=False,\n",
" download=True, transform=transform)\n",
"testloader = torch.utils.data.DataLoader(testset, batch_size=32,\n",
" shuffle=False, num_workers=2)\n",
"\n"
],
"execution_count": 4,
"outputs": [
{
"output_type": "stream",
"text": [
"Downloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz\n",
"Downloading http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz\n",
"Downloading http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz\n",
"Downloading http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz\n",
"Processing...\n",
"Done!\n"
],
"name": "stdout"
}
]
},
{
"metadata": {
"id": "lsYbZg2t9mG0",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 276
},
"outputId": "78194f64-f83d-4ba6-bf98-53f5a44168f8"
},
"cell_type": "code",
"source": [
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"\n",
"\n",
"def imshow(img):\n",
" img = img / 2 + 0.5 # unnormalize\n",
" npimg = img.numpy()\n",
" plt.imshow(np.transpose(npimg, (1, 2, 0)))\n",
"\n",
"\n",
"dataiter = iter(trainloader)\n",
"images, labels = dataiter.next()\n",
"\n",
"imshow(torchvision.utils.make_grid(images))\n"
],
"execution_count": 5,
"outputs": [
{
"output_type": "display_data",
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAeQAAAEDCAYAAADk73fDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJztvXmgjHX///+wZqssHWQJRShLKoq0\nUJFSpKwJRYi0KURKKWVplSWiLFmKu0h8+EqkO5QlRcpWSGXLkvUO5/fH/J7XNWfOzFlnueac1+Of\n48zMGe/rmmuu63q+lucrR2JiYiKGYRiGYcSUnLFegGEYhmEYdkE2DMMwDE9gF2TDMAzD8AB2QTYM\nwzAMD2AXZMMwDMPwAHZBNgzDMAwPkDvcbzhkyBDWr19Pjhw56N+/PzVq1Aj3f2EYhmEYWY6wXpC/\n/fZbduzYwcyZM9m2bRv9+/dn5syZ4fwvDMMwDCNLEtaQ9YoVK7jlllsAuOSSSzh8+DBHjx4N539h\nGIZhGFmSsCrk/fv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tWsXgKN+33zzzSSvvfvuu53Hn3jiCcD9nO+6666orDcz\nLF68GIDt27ezYsUKALZu3RrLJYWNSpUqAbB582YAmjRpAkCnTp2c1yhi06ZNG8A3IAnciMiePXui\nslZhCtkwDMMwPEC2UMg1atQAoFq1agCULl2aH3/8EYDdu3cDvhyrngNXTXuR8uXLhxxpGchNN90E\nwKeffuo8ljOn7z7Mi1WtaUEztx9++OGgz2/ZsoUZM2ZEc0kpUrFiRTp27Mj7778PuHfdVapUSfK6\ntHwe+fLlA3Dmz8ZLNfl3330HwIgRIwD466+/AMiRI0eS373AY489BkCuXLkcK+CiRYsCySNp+jze\ne+89unTpArjfNdWp/P7775FfdAZ56623AN85Ye7cuQAcOHAgzX8/YMAAAO68807Aza0vWLAgnMtM\nF8899xzgntv79u2b5r8dPHgwAF9//TUAr7/+OgDTp08HYM6cOSxatChsaw3EFLJhGIZheIBsoZB1\nVzt8+HDAV1mtHOOSJUsAN5dw//33A+5dYrxWYQdDd4rKdakSOd74448/Unz+ueeec/pHY0XFihWd\nfxcsWJASJUrQr1+/oK9duXIlAGvWrAEgMTHReU499MrBxhsPPfQQ4EanRPny5QFvVvL+/PPPgO+8\ncd999wGuYgrk77//BuDSSy/lf//7HwDXXnst4FPYAOPHj4/oejPDBx98AECzZs0YMmQIAJ07d07z\n32usoKr+N23aFN4FppPnnnuOCy+8EICLLroow++j2ozAGo27777bia7mz58fIKzdK9nigiyCXVyn\nTp2a5HeFt1X0VbNmTc+Fr7/99lsuueSSJI+pEKV169ZBHz98+HB0FhdBPvzwQyB0S8KWLVsAXyg7\nsGAq2viHn3v27JnkuRMnTgBuGEwn8mDHmYq34rFlLVeuXHz11VcA1K5dG8ApHPJSSiEQfR7lypUL\neSEOZOrUqbzyyiuAG65VWkFteV5EIdohQ4awY8eODL+PCvKUlok2am8877zzku1vf/MZgH/++Qdw\nC7fSQ548eZx9phs3fdcV3s4MFrI2DMMwDA+QrRRyWrj99tsBtyBg/vz5nrPZVLjPn0BlHPi4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AZ86\nU1FGVkdhXK+hELWUsbjmmmsAePPNN1N9DyljtYOpgOrIkSNOkduHH34YngWnglSRbtYD281OnTrl\nfP/Lly8flTWFkzp16qQ6Ni+l0LUe00+9NppjBbds2QK46YQbb7wRcM9volixYs73Rj8HDBiQ5DVK\nhwXSo0ePkM95AX0fNm7cmOw5PaZobteuXQHYsWNHkp/RIkdiYmJiWl44cuRIihQpQvv27albt64T\nxti5cyd9+vThvvvu48cff6R///6A7+Ry4YUX0rp165DvuXfvXooXLx6GzTAMwzAM7zNo0CAn5x5I\npou6Ql3P03KdHz16dJLFZfbOUQVABQoUAKB58+YAye78zp49y759+5K8RvmvatWqAfDwww8DvvyY\nckDpUcrhHLatth6p+MTERKc4Q3kfNbKLSy65BIBmzZoBcPLkST766CP69+/Phg0bALekf926dele\nkxeGiStPft111yV5fNmyZUyZMiXD7xvObZs/fz633347U6dO5fjx44D73ahduzbgKuSUcvw6dpWL\nlTIWgwcP5vfff0/Tmvy3LxKfW/Xq1QGYMWOGc4xddNFFQV/7/PPPA77imXCkuOrUqZPpc4r2T0p5\n4sDCre7duzuvD5V3Fio+TG9OORzH5ffffx/0b8eMGZOh8wC4x3hmidQ55bvvvgOSn+fuvvtu5zv4\n22+/heX/CkVqkRaRobanAgUKcPLkScBXWFO8eHGKFy+epJjE1K9hGIZhpJ0MKeR69eqxcOFCmjVr\nxqJFi7j++uupWbMmzz77LEeOHCFXrlysXbvWCV+Hk1q1agHunWm5cuWcCl0pY931hOKyyy5z8iN6\nrdSLqgN1wwE42xHtKmvle9S8LlatWsWMGTMAnwkGJK/QVQO+hjNUr17dUVWqGlczf0bvjGPFxRdf\nDLhKJFAht2jRIlMKOdw88MAD7Nq1y8n7ymTgtddeA9KW85XqbNOmTZLHDxw4AJBmdRxJVIGqVpde\nvXqFfO2qVasA+N///gfgqQLQlJRxqDzw2LFjHcX74IMPAqGVto5bvS4WqBpa57l4OwekB3WiqG5I\nNUWzZs1i4cKFgNudoohNai1gkSLVC/KGDRs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xevJhZs2YxceJEGjVq5Dxux3f4iJlCDjaMIiEhIVbLyZKUKFGC22+/nRw5cnDRRRdxwQUXcPjw\nYU6ePAnAnj17bABIhChQoECy/WwDWCJH3bp1qVq1KgANGzZk8+bNtr/DyPLlyxk7dizjx4/n3HPP\nteM7QsTsgnzdddexcOFCADZu3Ejx4sUdb2wjPMydO5cJEyYAsG/fPg4cOECLFi2c/b5o0SKuv/76\nWC4xy1KvXr1k+7lmzZr8+OOPHDlyhGPHjrF27VquvvrqGK80a9CrVy927doF+PL3lSpVsv0dJv75\n5x+GDRvGu+++61Sx2/EdGWLqZT1ixAhWr15Njhw5eP7556lSpUqslpIlOXr0KE899RRHjhzh33//\n5ZFHHqFq1ar07duXU6dOUapUKV555RXy5MkT66XGNcEGsIwYMYJ+/fol2882gCXzBNvf7du3Z9y4\nceTPn58CBQrwyiuvUKxYMdvfYWDmzJmMHDmSChUqOI+9+uqrPPvss3Z8hxkbLmEYhmEYHsCcugzD\nMAzDA9gF2TAMwzA8gF2QDcMwDMMD2AXZMAzDMDyAXZANwzAMwwPYBdkwDMMwPIBdkA3DMAzDA9gF\n2TAMwzA8wP8HgbU5YlEcKHIAAAAASUVORK5CYII=\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x7f12b983e898>"
]
},
"metadata": {
"tags": []
}
}
]
},
{
"metadata": {
"id": "pxYwY0Ej-s0v",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
},
"outputId": "35c6dc55-e7f7-485c-d389-dee10cba0086"
},
"cell_type": "code",
"source": [
"images[0].size()"
],
"execution_count": 6,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"torch.Size([1, 28, 28])"
]
},
"metadata": {
"tags": []
},
"execution_count": 6
}
]
},
{
"metadata": {
"id": "5YXMcKJP9rt8",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"import torch.nn as nn"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "ercl8jN597GM",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
""
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "1V5O65279Abj",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"class RP(nn.Module):\n",
" def __init__(self):\n",
" super().__init__()\n",
" mylist = nn.ModuleList()\n",
" for i in range(1):\n",
" mylist.append(nn.Linear(28*28, 28*28))\n",
" mylist.append(nn.SELU())\n",
" self.seq = nn.Sequential(*mylist)\n",
"\n",
" \n",
" def forward(self, x):\n",
" return self.seq(x.view(x.size(0), -1))"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "NuSZYC6bKhpx",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"class Highway(nn.Module):\n",
" def __init__(self, F, input_size):\n",
" super().__init__()\n",
" self.F = F\n",
" self.input_size = input_size\n",
" self.T = nn.Linear(input_size, input_size)\n",
" self.T.bias.data.fill_(-3)\n",
" self.sigmoid = nn.Sigmoid()\n",
" \n",
" def forward(self, x):\n",
" out = self.F(x)\n",
" T = self.sigmoid(self.T(x))\n",
" return T*out + (1.0 - T)*x\n",
" \n",
" "
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "gDyi_5ZdLWJX",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"class HWN(nn.Module):\n",
" def __init__(self):\n",
" super().__init__()\n",
" \n",
" ml = nn.ModuleList()\n",
" for i in range(50):\n",
" seq = nn.Sequential(\n",
" nn.Linear(28*28, 28*28),\n",
" nn.ReLU()\n",
" )\n",
" \n",
" ml.append( Highway( seq, 28*28 ) )\n",
" \n",
" self.hw = nn.Sequential( *ml )\n",
" self.fc = nn.Linear(28*28, 10)\n",
" self.softmax = nn.Softmax(dim=1)\n",
" \n",
" def forward(self, x):\n",
" x = x.view(x.size(0), -1)\n",
" x = self.hw(x)\n",
" x = self.fc(x)\n",
" return x\n",
" #return self.softmax(x)\n",
" "
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "M556Gy4cNDE8",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"net = HWN()"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "WZR0I1PrLhWW",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"net = net.cuda()"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "-1xN0SosNlIZ",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"import torch.optim as optim\n",
"\n",
"criterion = nn.CrossEntropyLoss()\n",
"optimizer = optim.SGD(net.parameters(), lr=0.01)#, momentum=0.9)"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "H0XxuS6DWtWM",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"device = torch.device(\"cuda\")"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "SvdljO99WjGg",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"def test(model, device, test_loader):\n",
" model.eval()\n",
" test_loss = 0\n",
" correct = 0\n",
" with torch.no_grad():\n",
" for data, target in test_loader:\n",
" data, target = data.to(device), target.to(device)\n",
" output = torch.log_softmax(model(data), dim=1)\n",
" test_loss += F.nll_loss(output, target, reduction='sum').item() # sum up batch loss\n",
" pred = output.max(1, keepdim=True)[1] # get the index of the max log-probability\n",
" correct += pred.eq(target.view_as(pred)).sum().item()\n",
"\n",
" test_loss /= len(test_loader.dataset)\n",
" print('\\nTest set: Average loss: {:.4f}, Accuracy: {}/{} ({:.0f}%)\\n'.format(\n",
" test_loss, correct, len(test_loader.dataset),\n",
" 100. * correct / len(test_loader.dataset)))\n",
" \n",
" model.train()\n",
"\n"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "qMpkjYAlJLgV",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"scheduler = optim.lr_scheduler.StepLR(optimizer, step_size=5, gamma=0.5)"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "4wBf-0v5PLR_",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 1054
},
"outputId": "c0e3f291-ad16-487e-d833-0e5e95c15144"
},
"cell_type": "code",
"source": [
"for epoch in range(100): # loop over the dataset multiple times\n",
" scheduler.step()\n",
" running_loss = 0.0\n",
" for i, data in enumerate(trainloader, 0):\n",
" # get the inputs\n",
" inputs, labels = data\n",
"\n",
" # zero the parameter gradients\n",
" optimizer.zero_grad()\n",
"\n",
" # forward + backward + optimize\n",
" outputs = net(inputs.cuda())\n",
" loss = criterion(outputs, labels.cuda())\n",
" loss.backward()\n",
" optimizer.step()\n",
"\n",
" # print statistics\n",
" running_loss += loss.item()\n",
" if i % 200 == 199: # print every 200 mini-batches\n",
" print('[%d, %5d] loss: %.7f' %\n",
" (epoch + 1, i + 1, running_loss / 200))\n",
" running_loss = 0.0\n",
" #test(net, device, testloader)\n",
"\n",
"\n",
"print('Finished Training')\n"
],
"execution_count": 0,
"outputs": [
{
"output_type": "stream",
"text": [
"[1, 200] loss: 2.2228167\n",
"[1, 400] loss: 2.0689299\n",
"[1, 600] loss: 1.9293880\n",
"[1, 800] loss: 1.7969398\n",
"[1, 1000] loss: 1.6691611\n",
"[1, 1200] loss: 1.5360413\n",
"[1, 1400] loss: 1.4119227\n",
"[1, 1600] loss: 1.3066598\n",
"[1, 1800] loss: 1.2026807\n",
"[2, 200] loss: 1.0800963\n",
"[2, 400] loss: 0.9861976\n",
"[2, 600] loss: 0.9234034\n",
"[2, 800] loss: 0.8803566\n",
"[2, 1000] loss: 0.8169722\n",
"[2, 1200] loss: 0.7670708\n",
"[2, 1400] loss: 0.7282899\n",
"[2, 1600] loss: 0.6872202\n",
"[2, 1800] loss: 0.6547833\n",
"[3, 200] loss: 0.6240231\n",
"[3, 400] loss: 0.6151459\n",
"[3, 600] loss: 0.6009396\n",
"[3, 800] loss: 0.5700441\n",
"[3, 1000] loss: 0.5584773\n",
"[3, 1200] loss: 0.5339702\n",
"[3, 1400] loss: 0.5293032\n",
"[3, 1600] loss: 0.5035653\n",
"[3, 1800] loss: 0.5154778\n",
"[4, 200] loss: 0.4791781\n",
"[4, 400] loss: 0.4846514\n",
"[4, 600] loss: 0.4846456\n",
"[4, 800] loss: 0.4628088\n",
"[4, 1000] loss: 0.4526667\n",
"[4, 1200] loss: 0.4597595\n",
"[4, 1400] loss: 0.4615633\n",
"[4, 1600] loss: 0.4491191\n",
"[4, 1800] loss: 0.4376944\n",
"[5, 200] loss: 0.4324945\n",
"[5, 400] loss: 0.4232682\n",
"[5, 600] loss: 0.4284526\n",
"[5, 800] loss: 0.4137639\n",
"[5, 1000] loss: 0.4290935\n",
"[5, 1200] loss: 0.4027735\n",
"[5, 1400] loss: 0.3935796\n",
"[5, 1600] loss: 0.4033876\n",
"[5, 1800] loss: 0.3871577\n",
"[6, 200] loss: 0.3852943\n",
"[6, 400] loss: 0.3714200\n",
"[6, 600] loss: 0.4025640\n",
"[6, 800] loss: 0.3840378\n",
"[6, 1000] loss: 0.3878418\n",
"[6, 1200] loss: 0.3814455\n",
"[6, 1400] loss: 0.3746588\n",
"[6, 1600] loss: 0.3953459\n",
"[6, 1800] loss: 0.3796620\n",
"[7, 200] loss: 0.3810881\n",
"[7, 400] loss: 0.3638740\n",
"[7, 600] loss: 0.3856409\n",
"[7, 800] loss: 0.3863000\n",
"[7, 1000] loss: 0.3616689\n",
"[7, 1200] loss: 0.3688783\n",
"[7, 1400] loss: 0.3555660\n"
],
"name": "stdout"
}
]
},
{
"metadata": {
"id": "u_5qHM5IhscS",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 68
},
"outputId": "f8e8d787-70f2-4af6-b9bd-d6590ab70b20"
},
"cell_type": "code",
"source": [
"test(net, device, testloader)"
],
"execution_count": 24,
"outputs": [
{
"output_type": "stream",
"text": [
"\n",
"Test set: Average loss: 0.3665, Accuracy: 9847/10000 (98%)\n",
"\n"
],
"name": "stdout"
}
]
},
{
"metadata": {
"id": "U2e3QgwMpNNi",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
""
],
"execution_count": 0,
"outputs": []
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment