library for deep learning and privacy preserving deep learning
Project description
hideandseek
deep learning and privacy preserving deep learning library.
Currently integrating from experiment codes. (26.9.2021.)
import torch
from omegaconf import OmegaConf
import hideandseek as hs
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
cfg = OmegaConf.load('config.yaml') # omegaconf.OmegaConf.DictConfig object
model = DNN() # torch.nn.Module object
train_dataset = dataset # torch.utils.data.Dataset object
kwargs = {
'model': model,
'dataset': train_dataset,
'cfg_train': cfg,
'criterion': criterion,
}
node = hs.Node(**kwargs)
model.to(device)
node.step(local_T=20, horizon='epoch') # trains for 20 epochs
# node.step(local_T=1000, horizon='step') # trains for 1000 steps
model.cpu()
node.save()
test_results = hs.eval.test(node)
scores = hs.eval.scores(test_results)
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
hideandseek-0.1.1.tar.gz
(9.5 kB
view hashes)
Built Distribution
Close
Hashes for hideandseek-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05228928d39b2461eeb22a995601ba612cb870e839bc466a26090c0419b8caee |
|
MD5 | 608adffd7c7b85f305e414a4f2eadcd0 |
|
BLAKE2b-256 | 6187fd9c924614c7be9bec2639d41f91062d627bcc606acba939f240014ba07d |