Skip to main content

DeepStorm: Deep Learning Framework

Summary:

Deep Learning Framework from scratch, with an API of a combination of pytorch and keras APIs, only uses numpy for tensor operations.

Pip install:

pip install DeepStorm

Layers & DL classes in framework:

  • Conv2d
  • MaxPool2d
  • BatchNorm2d
  • Flatten
  • Dropout
  • Linear
  • ReLU
  • Softmax
  • SgdWithMomentum
  • Adam
  • CrossEntropyLoss
  • Xavier
  • He

Model building:

layers = [
    Conv2d(in_channels=1, out_channels=32,
           kernel_size=3, stride=1, padding='same'),
    BatchNorm2d(32),
    Dropout(probability=0.3),
    ReLU(),

    Conv2d(in_channels=32, out_channels=64,
           kernel_size=3, stride=1, padding='same'),
    BatchNorm2d(64),
    ReLU(),
    MaxPool2d(kernel_size=2, stride=2),

    Conv2d(in_channels=64, out_channels=64,
           kernel_size=3, stride=1, padding='same'),
    BatchNorm2d(64),
    ReLU(),
    MaxPool2d(kernel_size=2, stride=2),

    Flatten(),

    Linear(in_features=64*7*7, out_features=128),
    ReLU(),
    Linear(128, 64),
    ReLU(),
    Linear(64, 10),
    SoftMax(),
]

model = Model(layers)

Or

model = Model()

model.append_layer(Conv2d(in_channels=1, out_channels=32,
                          kernel_size=3, stride=1, padding='same'))
model.append_layer(BatchNorm2d(32))
model.append_layer(ReLU())
model.append_layer(Conv2d(in_channels=32, out_channels=64,
                          kernel_size=3, stride=1, padding='same'))
model.append_layer(BatchNorm2d(64))
model.append_layer(ReLU())
model.append_layer(MaxPool2d(kernel_size=2, stride=2))

model.append_layer(Conv2d(in_channels=64, out_channels=64,
                          kernel_size=3, stride=1, padding='same'))
model.append_layer(BatchNorm2d(64))
model.append_layer(ReLU())
model.append_layer(MaxPool2d(kernel_size=2, stride=2))
model.append_layer(Flatten())
model.append_layer(Linear(in_features=64*7*7, out_features=128))
model.append_layer(ReLU())
model.append_layer(Linear(in_features=128, out_features=64))
model.append_layer(ReLU())
model.append_layer(Linear(in_features=64, out_features=10))
model.append_layer(SoftMax())

Model compile:

batch_size = 16
model.compile(optimizer=Adam(learning_rate=5e-3, mu=0.98, rho=0.999), loss=CrossEntropyLoss(),
              batch_size=batch_size, metrics=['accuracy'])

Model training:

epochs = 25
history = model.fit(x_train=train_images, y_train=train_labels, x_val=val_images, y_val=val_labels, epochs=epochs)

Model performance:

plt.plot(history['accuracy'])
plt.plot(history['val_accuracy'])
plt.title('model accuracy')
plt.ylabel('accuracy')
plt.xlabel('epoch')
plt.legend(['train', 'val'], loc='upper left')
plt.show()

Metadata

Release files for DeepStorm 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for DeepStorm 1.1.0
File Size Uploaded
DeepStorm-1.1.0.tar.gz 26.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for DeepStorm 1.1.0
File Interpreter ABI Platform
DeepStorm-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 42.9 kB

Release files / DeepStorm-1.1.0.tar.gz

Download URL DeepStorm-1.1.0.tar.gz
Size 26.5 kB
Tags Source
SHA-256 checksum
How to use checksums
deef0d645c11e89b6cb14e6c3840d87c91e5ca2c229400322a448d1932455243
BLAKE2b-256 checksum
How to use checksums
b8a54bc2f186d7355fc18c9c51c432bd90378f6ee8c29c9cce8eb626e6a3d797
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / DeepStorm-1.1.0-py3-none-any.whl

Download URL DeepStorm-1.1.0-py3-none-any.whl
Size 16.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d57c48775e9cac298632ca1c301e8a047f322beaef1855f93d621e6c64bf228
BLAKE2b-256 checksum
How to use checksums
0398a614ce9c12d16945c0bbeb02fa1b77a297d2cbb4a5b48f6a4f05d0ef81d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page