Skip to main content

Installation

To install ZenGrad, run the following command:

pip install zengrad-pytorch

Implementation

import torch
from zengrad_pytorch import ZenGrad  # Custom optimizer

# Define the model

# Instantiate the model
model = SimpleModel()

# Define loss function
criterion = nn.CrossEntropyLoss()

# Instantiate optimizer
optimizer = ZenGrad(model.parameters(), lr=0.01, weight_decay=1e-4, epsilon=1e-8) # <---- In This Way

# Model summary (optional)
print(model)

License

ZenGrad_pytorch is released under the Apache License 2.0.

Metadata

Release files for zengrad-pytorch 0.0.1

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

Source distribution (sdist)

Source distribution for zengrad-pytorch 0.0.1
File Size Uploaded
zengrad_pytorch-0.0.1.tar.gz 2.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zengrad-pytorch 0.0.1
File Interpreter ABI Platform
zengrad_pytorch-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 5.3 kB

Release files / zengrad_pytorch-0.0.1.tar.gz

Download URL zengrad_pytorch-0.0.1.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2cd7c3a6ccf15a26b34b15540e3ea8e00dd7bbc330ed192ba116ca66b36b105f
BLAKE2b-256 checksum
How to use checksums
8215d54b8ef0d268acc67b603b5b003b5cd952a38e57792a5f4cb3487d63a0a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / zengrad_pytorch-0.0.1-py3-none-any.whl

Download URL zengrad_pytorch-0.0.1-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d202175601d2fd52905e12cba900a8af7f9674901eadbea34708a0b8ebd99c21
BLAKE2b-256 checksum
How to use checksums
71b9e2f2e3145ba62602853909ec36ecd36c512e53989284a08e63619368605a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.0.1 This release

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