The SF Tensor package
Project description
sf-tensor
Minimal start of a Python package for functionality related to the services offered by SF Tensor. This will include functionality to interact with SF Tensor's API endpoints for metric logging and more.
Updates will arrive in the next days and weeks ;)
Installation
Install with:
pip install sf-tensor
Usage
from sf_tensor import logAccuracy
import torch
from torch import nn
model = nn.Sequential(nn.Linear(4, 2))
opt = torch.optim.SGD(model.parameters(), lr=0.1)
loss_fn = nn.CrossEntropyLoss()
x = torch.randn(64, 4)
y = torch.randint(0, 2, (64,))
for _ in range(5):
opt.zero_grad(); o = model(x); (loss_fn(o, y)).backward(); opt.step()
logAccuracy((o.argmax(1) == y).float().mean().item())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sf_tensor-0.0.1.tar.gz
(2.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sf_tensor-0.0.1.tar.gz.
File metadata
- Download URL: sf_tensor-0.0.1.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5e659f7fbe3128e2790f1811253af3545353de1944b04f25bbefd2661583c7d
|
|
| MD5 |
e90f363c20b1d561c09b750bc10d287c
|
|
| BLAKE2b-256 |
7b7b9b883394acbde1fef6d21c133a75763ee9a0cb5fee427c5aa44e79a0976f
|
File details
Details for the file sf_tensor-0.0.1-py3-none-any.whl.
File metadata
- Download URL: sf_tensor-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
824da8b21735b3447a45375b9f610ae0a2f0c87a8eba187784dbffd7ac2e0f1d
|
|
| MD5 |
6b4e785989a3f4bf647deb99ef3f0894
|
|
| BLAKE2b-256 |
f8e597dc650ee07bf98adb0ca1b65ff419eb36fb252cac0d6f8a536dd70c3ea9
|