https://github.com/cserajdeep/dnn-iris-pytorch
Deep Neural Network with Batch normalization for tabulat datasets.
https://github.com/cserajdeep/dnn-iris-pytorch
batch batch-normalization classification cuda deep-learning dnn iris-dataset
Last synced: about 1 month ago
JSON representation
Deep Neural Network with Batch normalization for tabulat datasets.
- Host: GitHub
- URL: https://github.com/cserajdeep/dnn-iris-pytorch
- Owner: cserajdeep
- License: mit
- Created: 2021-06-26T17:11:45.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-06-26T19:41:38.000Z (almost 5 years ago)
- Last Synced: 2025-06-18T12:51:51.589Z (12 months ago)
- Topics: batch, batch-normalization, classification, cuda, deep-learning, dnn, iris-dataset
- Language: Jupyter Notebook
- Homepage:
- Size: 160 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deep Neural Network
(1) BN_DNN with 4 layers and 1 output layer. The model gives 100% test accuracy for Iris 7:3 split.
(2) DNN_LITE with 2 layers and 1 output layer. The model provides 91.11% test accuracy for same 7:3 split.
Model
Accuracy (%)
AUC
#Param>
BN_DNN
100
1.00
202,755
DNN_LITE
91.11
0.978
2,953
Updated: 26-June-2021.
# Heavy Neural Architecture (BN_DNN)
```ruby
class BN_DNN(nn.Module):
"""Feedfoward neural network with 4 hidden layer"""
def __init__(self, in_size, out_size):
super().__init__()
# hidden layer 1
self.linear1 = nn.Linear(in_size, 256)
nn.BatchNorm1d(256) #applying batch norm
# hidden layer 2
self.linear2 = nn.Linear(256, 512)
nn.BatchNorm1d(512) #applying batch norm
# hidden layer 3
self.linear3 = nn.Linear(512, 128)
nn.BatchNorm1d(128) #applying batch norm
# hidden layer 4
self.linear4 = nn.Linear(128, 32)
nn.BatchNorm1d(32) #applying batch norm
# output layer
self.linear5 = nn.Linear(32, out_size)
```
# Light-weight Neural Architecture (DNN_LITE)
```ruby
class DNN_LITE(nn.Module):
def __init__(self, input_dim, out_dim):
super(DNN_LITE, self).__init__()
self.layer1 = nn.Linear(input_dim, 50)
nn.BatchNorm1d(50)
self.layer2 = nn.Linear(50, 50)
nn.BatchNorm1d(50)
self.layer3 = nn.Linear(50, out_dim)
```
# Batch Normalized DNN