一些ai开发过程中使用到的工具模块
Project description
aikit
一些ai开发过程中使用到的工具模块
安装
git clone git@github.com:cpcgskill/aikit.git
使用
aos
import os
# 设置以下环境变量为腾讯云cos的配置
os.environ['COS_Region'] = 'ap-hongkong'
os.environ['COS_SecretId'] = ''
os.environ['COS_SecretKey'] = ' '
os.environ['COS_Bucket'] = ' '
import torch
from aidevkit.aos import Saver
class MyModule(torch.nn.Module):
def __init__(self):
super(MyModule, self).__init__()
self.linear = torch.nn.Linear(10, 10)
self.s = 1
def forward(self, x):
return self.linear(x)
saver = Saver(lambda: MyModule(), 'test.pt', 3)
for i in range(10):
saver.step()
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
aidevkit-0.3.2.tar.gz
(9.5 kB
view hashes)
Built Distribution
Close
Hashes for aidevkit-0.3.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a912e6a50b6caaf37590a98ca6cc1ca913ea666b0fc9c1f7618b1bff11698e6 |
|
MD5 | 43aa1f6f95940b764b68aed6073dd84e |
|
BLAKE2b-256 | 701ab31b34b1f52a6dc8771dafbfced98df9f3b78e38f1f3b61875aaced33234 |