diff --git a/Tasks/daily tasks/Randheerrrk/day4.ipynb b/Tasks/daily tasks/Randheerrrk/day4.ipynb new file mode 100644 index 0000000..99acda8 --- /dev/null +++ b/Tasks/daily tasks/Randheerrrk/day4.ipynb @@ -0,0 +1,103 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "name": "day4.ipynb", + "provenance": [] + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + } + }, + "cells": [ + { + "cell_type": "code", + "metadata": { + "id": "HiM8CZJPk6jc", + "colab_type": "code", + "colab": {} + }, + "source": [ + "import torch.nn as nn\n", + "import torch.nn.functional as f" + ], + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "sOedKVRUlJ9y", + "colab_type": "code", + "colab": {} + }, + "source": [ + "class Net(nn.Module) :\n", + " def __init__(self) :\n", + " super(Net, self).__init__()\n", + " self.i = nn.Linear(64, 32)\n", + " self.h = nn.Linear(32, 16)\n", + " self.o = nn.Linear(16, 10)\n", + " def forward(sefl, X) :\n", + " X = self.i(X)\n", + " X = f.Sigmoid(X)\n", + " X = self.h(X)\n", + " X = f.Sigmoid(X)\n", + " X = self.o(X)\n", + " return X" + ], + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "metadata": { + "id": "pyQT3dA1m9Rp", + "colab_type": "code", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 104 + }, + "outputId": "7f7381c1-a5ee-4e08-c72e-9549892569fb" + }, + "source": [ + "model = Net()\n", + "model" + ], + "execution_count": 6, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "Net(\n", + " (i): Linear(in_features=64, out_features=32, bias=True)\n", + " (h): Linear(in_features=32, out_features=16, bias=True)\n", + " (o): Linear(in_features=16, out_features=10, bias=True)\n", + ")" + ] + }, + "metadata": { + "tags": [] + }, + "execution_count": 6 + } + ] + }, + { + "cell_type": "code", + "metadata": { + "id": "XkvBVPvMnG_I", + "colab_type": "code", + "colab": {} + }, + "source": [ + "" + ], + "execution_count": 0, + "outputs": [] + } + ] +} \ No newline at end of file