`Keras.Model.fit`-like torch fit implementation
Project description
torch-model
Keras-like torch module wrapper
Tested with Torch 1.8.0
Install
$ pip install torch-model
Usage
from torch_model import Model
from torch_model.callbacks import EarlyStopping
model = Model(MyPyTorchModule())
model.compile(
loss='mse',
optimizer='adam',
metrics=['mae', 'mape']
)
history = model.fit(
train_ds,
validation_data=val_ds,
callbacks=[
EarlyStopping(monitor='val_loss', patience=5)
]
)
# The original torch module
model.module
License
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
torch-model-0.0.1.tar.gz
(2.3 kB
view details)
Built Distribution
File details
Details for the file torch-model-0.0.1.tar.gz
.
File metadata
- Download URL: torch-model-0.0.1.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb4774000ea52af2e8cc80db25482759b924138ed7a467b0048862da30487f1f |
|
MD5 | ad6f36ef1199253335bf875ff84bc34a |
|
BLAKE2b-256 | da822f0b5a023bea6c38b42c22210d2dce7491a7f546842436b294d63f73d056 |
File details
Details for the file torch_model-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: torch_model-0.0.1-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b47c480cd7bda632b0192ac8a8b1a72d2fa881ad52811f8c90942dcf3a86b8a |
|
MD5 | 7bebbb7dd6a026b9f33239c78571f75a |
|
BLAKE2b-256 | 5048a2125e0c239afe0d6885a7722edbb53bea24e7b3b7c3b659d8b69236aab6 |