Skip to content

Latest commit

 

History

History
61 lines (50 loc) · 1.46 KB

README.md

File metadata and controls

61 lines (50 loc) · 1.46 KB

Deep-Learning-Module

The repository contains Deep Learning Module built from scratch for prediction of rent of a room and were built as a part of Summer Internship Project.

For using the module,

# for using the module 
# clone this repository 
git clone https://github.com/anshulg954/Deep-Learning-Module

Adding the neccessary files,

from NeuralNetwork import *
from utils import *
from Dense import *
from sigmoid_block import *
from MeanSquaredError import *
from activation import *
from sklearn.datasets import load_boston
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
from Trainer import *
from sgd import *

After importing the required files.

# define you model. 
# like here i am defining the model with 3 layers. 
# each hidden layer will have the 13 neurons. 

model = NeuralNetwork(
    layers=[Dense(neurons=13,
                   activation=SigMoid()),
            Dense(neurons=13,
                   activation=SigMoid()),
            Dense(neurons=1,
                   activation=Linear())],
    loss=MeanSquaredError(),
    seed=20190501
)

Now load the data in the and train the model.

# make a trainer class. 
train = Trainder(model, SGD(lr = 0.01))

train.fit(X_train,
            y_train,
            X_test,
            y_test,
            epochs=5,
            eval_every=9,
            seed=20190501)

# you model will be trained.