Skip to content

Repository files navigation

Neural Network Module

for using the module.

# for using the module # clone this repository git clone https://github.com/MkshSahani/deep_learning 

adding the neccessary files.

fromNeuralNetworkimport*fromutilsimport*fromDenseimport*fromsigmoid_blockimport*fromMeanSquaredErrorimport*fromactivationimport*fromsklearn.datasetsimportload_bostonfromsklearn.preprocessingimportStandardScalerfromsklearn.model_selectionimporttrain_test_splitfromTrainerimport*fromsgdimport*

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. 

About

deep learning modules using python.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages