Skip to main content

a pytorch lib that helps you to quickly write your training code

Project description

torch_lib

介绍

torch_lib是一个快速搭建pytorch模型训练过程的库,并且可以进行控制台训练过程可视化(与keras的风格相似)解放双手,值得拥有

快速上手

此部分默认您已经熟悉pytorch的模型搭建过程和数据处理过程,若仍不熟悉请阅读pytorch官方文档进行学习

1.模型训练

from torch_lib import fit
from torch.nn import Module
from torch.utils.data import DataLoader

model = Module() # 标准的pytorch建模过程,详见pytorch官方文档,此行代码仅表示model的类型
dataset = DataLoader() # 标准的数据集格式,详见pytorch官方文档,此行代码仅表示dataset的类型
loss_options = { 'option1': 'value' }
fit(model=model, train_dataset=dataset, epochs=100, loss_func='ce', optimizer='adam', metrics=None, learning_rate=1e-4, lr_decay='step', loss_options=loss_options, optimizer_options=None, lr_decay_options=None, device='cpu')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

torch_lib-0.2.7.tar.gz (9.4 kB view details)

Uploaded Source

File details

Details for the file torch_lib-0.2.7.tar.gz.

File metadata

  • Download URL: torch_lib-0.2.7.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.11

File hashes

Hashes for torch_lib-0.2.7.tar.gz
Algorithm Hash digest
SHA256 941bcee8d4dcb2f1068c02a8cd36cebdb8f1f71b12ec3a383ff4cc4698045ce2
MD5 0aa2b2a51b3ad3b22d9a82b1ac77f9cc
BLAKE2b-256 2f8463bff637ae61fcf9784191f2942d0399ef80fbdaabb94ab9c840e263c03d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page