diff --git a/Tasks/daily tasks/GopikrishnanK/.ipynb_checkpoints/Day4_Task-checkpoint.ipynb b/Tasks/daily tasks/GopikrishnanK/.ipynb_checkpoints/Day4_Task-checkpoint.ipynb new file mode 100644 index 0000000..2fd6442 --- /dev/null +++ b/Tasks/daily tasks/GopikrishnanK/.ipynb_checkpoints/Day4_Task-checkpoint.ipynb @@ -0,0 +1,6 @@ +{ + "cells": [], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Tasks/daily tasks/GopikrishnanK/Day4_Task.ipynb b/Tasks/daily tasks/GopikrishnanK/Day4_Task.ipynb new file mode 100644 index 0000000..afba5cf --- /dev/null +++ b/Tasks/daily tasks/GopikrishnanK/Day4_Task.ipynb @@ -0,0 +1,91 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import torch\n", + "import torch.nn as nn\n" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "class DummyMod(nn.Module):\n", + " def __init__(self,ip_size):\n", + " self.ip = nn.Linear(i,64)\n", + " self.h1 = nn.Linear(64,128)\n", + " self.h2 = nn.Linear(128,32)\n", + " self.op = nn.Linear(32,1)\n", + " self.sigmo = nn.Sigmoid()\n", + " \n", + " def forward(x):\n", + " x = self.ip(x)\n", + " x = self.h1(x)\n", + " x = self.sigmo(x)\n", + " x = self.h2(x)\n", + " x = self.op(x)\n", + " return(x)\n", + " \n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "DummyMod(\n", + " (ip): Linear(in_features=128, out_features=64, bias=True)\n", + " (h1): Linear(in_features=64, out_features=128, bias=True)\n", + " (h2): Linear(in_features=128, out_features=32, bias=True)\n", + " (op): Linear(in_features=32, out_features=1, bias=True)\n", + " (sigmo): Sigmoid()\n", + ")\n" + ] + } + ], + "source": [ + "model = DummyMod()\n", + "print(model)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.8" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}