Skip to content

Commit

Permalink
'test'
Browse files Browse the repository at this point in the history
  • Loading branch information
SmBito committed Sep 28, 2019
1 parent b56c532 commit e477e9a
Showing 1 changed file with 56 additions and 8 deletions.
64 changes: 56 additions & 8 deletions 03.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -22,7 +22,27 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 22,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"torchvision.datasets.mnist.MNIST"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"type(train)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -32,7 +52,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 6,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -69,7 +89,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -79,17 +99,17 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"tensor([[-2.2363, -2.4409, -2.4171, -2.1568, -2.2548, -2.2759, -2.3771, -2.2130,\n",
" -2.3210, -2.3729]], grad_fn=<LogSoftmaxBackward>)"
"tensor([[-2.2460, -2.3058, -2.3153, -2.3613, -2.2639, -2.2549, -2.2464, -2.3105,\n",
" -2.3159, -2.4196]], grad_fn=<LogSoftmaxBackward>)"
]
},
"execution_count": 14,
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -99,6 +119,34 @@
"output"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"tensor([0, 5, 1, 8, 9, 8, 7, 4, 3, 1])\n",
"tensor([9, 6, 2, 8, 3, 0, 3, 6, 0, 5])\n",
"tensor([8, 2, 8, 3, 1, 7, 3, 9, 4, 8])\n"
]
}
],
"source": [
"import torch.optim as optim\n",
"\n",
"optimizer = optim.Adam(net.parameters(), lr=1e-3)\n",
"\n",
"EPOCHS = 3\n",
"for epoch in range (EPOCHS):\n",
" for data in trainset:\n",
" X,y = data\n",
" \n",
" break"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit e477e9a

Please sign in to comment.