Yared-betsega / DL_Lab_2_Assignment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DL_Lab_2_Assignment

DenseLayer Neural Network

This repository contains a Python code snippet that demonstrates the implementation of a simple neural network using the torch library. The code defines a dense (fully connected) layer and applies it to a random input tensor.

The code comprises two primary components:

  1. DenseLayer Class: The DenseLayer class represents a single dense (fully connected) layer of a neural network. It initializes the layer with random weights and biases. The forward method performs a forward pass, computing the output of the layer.

  2. Example Usage: The code demonstrates how to create an instance of the DenseLayer class and use it to process a random input tensor. It prints the input and the output of the first and second layers to the console.

About


Languages

Language:Jupyter Notebook 100.0%