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(
alchemy_directory='/the/route/to/log',
train_dataloader=train_dataloader,
val_dataloader=val_dataloader,
model=model,
loss_func=MSELoss,
optimizer=optimizer,
# or, by passing a function to optimizer, TorchMiner can auto cuda the params of optimizer
# optimizer=lambda x: optim.SGD(x.parameters(), lr=0.01),
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(),
# or, you can use the below one to auto enable the above two
# *JupyterEnvironmentAutoEnable(),
# 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()
Metadata
Release files for torchminer 0.4.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| TorchMiner-0.4.14.tar.gz | 19.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| TorchMiner-0.4.14-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.8 kB
Release files / TorchMiner-0.4.14.tar.gz
| Download URL | TorchMiner-0.4.14.tar.gz |
|---|---|
| Size | 19.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a4b18cc00203b3af96eccc39012294c66781c88dd8ed21b5c17828bcdc330e4
|
|
BLAKE2b-256 checksum How to use checksums |
5569548c5408855c2eb8d7dd2e205dd93584de473b8c17db31a168b94dc8017a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.11 CPython/3.8.10 Windows/10
|
Release files / TorchMiner-0.4.14-py3-none-any.whl
| Download URL | TorchMiner-0.4.14-py3-none-any.whl |
|---|---|
| Size | 22.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
58249f58bbfa6d8805d2e7f02656dd6aa9f71d7b823763772f38565dadbfdb5e
|
|
BLAKE2b-256 checksum How to use checksums |
3726892a8db56baa218f4981340cd58d7ad6f7686caf061dfdbdb3da9bc41218
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.11 CPython/3.8.10 Windows/10
|