Run Torch With A Simple Miner
Project description
Published on pypi
Packaged Using Poetry
Description
TorchMiner is designed to automatic process the training ,evaluating and testing process for PyTorch DeepLearning,with a simple API.
You can access all Functions of MineTorch simply use Miner
.
Quick Start
import TorchMiner
from TorchMiner import Miner
from TorchMiner.plugins.Logger.Jupyter import JupyterLogger, JupyterTqdm
from TorchMiner.plugins.Metrics import MultiClassesClassificationMetric
from TorchMiner.plugins.Recorder import TensorboardDrawer
miner = Miner(
alchemistic_directory='/the/route/to/log',
train_dataloader=train_dataloader,
val_dataloader=val_dataloader,
model=model,
loss_func=MSELoss,
optimizer=optimizer,
experiment="the-name-of-experiment", # Subdistribution in the experimental directory
resume=True, # Whether to automatically load the previous model
eval_epoch=1, # How many rounds are evaluated
persist_epoch=2, # How many rounds are saved once a checkpoint
accumulated_iter=1, # How many times iterates the parameter update after accumulation
in_notebook=True,
amp=True, # Whether to use amp
plugins=[
# Use the plugins to extend the function of miner
JupyterLogger(),
JupyterTqdm(),
# The two above plugins are designed to get better output in Jupyter Enviroment
MultiClassesClassificationMetric(),
# This Plugin can automaticly calculate Accuracy, kappa score and Confusion Matrix in Classification problems.
TensorboardDrawer(input_to_model),
# This Plugin can record the informations generate by training process or by other plugins in Tensorboard.
],
)
# And then, trigger the training process by
miner.train()
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
TorchMiner-0.4.8.tar.gz
(17.6 kB
view hashes)
Built Distribution
TorchMiner-0.4.8-py3-none-any.whl
(21.3 kB
view hashes)
Close
Hashes for TorchMiner-0.4.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46ab6d20dd5477f628d66dec9f43fb7ded436e1b766f27baab6a15f0bf3df1b7 |
|
MD5 | b5c7fb76fd5be41f127f853ca0cdfa58 |
|
BLAKE2b-256 | b9a9caccd23cf7182e92566aa944b83cb47daaf912168ec1ede461a542485dc2 |