Skip to main content

Installation

pip install loglu-pytorch

Implementation

import torch
from loglu_pytorch import LogLU

# Define the model
class MyModel(nn.Module):
    def __init__(self):
        super(MyModel, self).__init__()
        self.fc1 = nn.Linear(784, 128)
        self.loglu = LogLU()        # <----- In This Way
        self.fc2 = nn.Linear(128, 10)

    def forward(self, x):
        x = self.fc1(x)
        x = self.loglu(x)
        x = self.fc2(x)
        return F.softmax(x, dim=1)  # Equivalent to 'softmax' activation in final layer

# Instantiate the model
model = MyModel()

# Print the model summary (you can use torchsummary for a detailed view)
from torchsummary import summary
summary(model, input_size=(1, 784))

License

LogLU_Pytorch is released under the Apache License 2.0.

Metadata

Release files for loglu-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 loglu-pytorch 0.0.1
File Size Uploaded
loglu_pytorch-0.0.1.tar.gz 2.3 kB Details

Built distribution (wheel)

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

Total release size: 4.8 kB

Release files / loglu_pytorch-0.0.1.tar.gz

Download URL loglu_pytorch-0.0.1.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4b9ae15f8eab9c21e843080d8ed8af0b7c9eead283daaafefd058ef25c852d6e
BLAKE2b-256 checksum
How to use checksums
d44b6132daf21f031744b2bf1f43e25e816ea44e77719b566ebd0e58b8b17e07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

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

Download URL loglu_pytorch-0.0.1-py3-none-any.whl
Size 2.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
487e3ac18d72a7069e8b86e13bf927705453f16ada8624327fb4571952a1285f
BLAKE2b-256 checksum
How to use checksums
adec50ba029d0bbfc83b4b58f7d28af9e26cbc3ea2e77307f8bf31f5dd32d5e4
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