Skip to main content

一些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.3.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

aidevkit-0.3.3-py2.py3-none-any.whl (10.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file aidevkit-0.3.3.tar.gz.

File metadata

  • Download URL: aidevkit-0.3.3.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for aidevkit-0.3.3.tar.gz
Algorithm Hash digest
SHA256 d4b0d29935da15adac559ff486caa3a20069ac096d83b339e8504fbddf0231a7
MD5 1925395ce8ea8ae46cec76fd33776a61
BLAKE2b-256 c19a828a3f45d0fcd686972153add6a9950fc0a502122142560db4f2393deb95

See more details on using hashes here.

File details

Details for the file aidevkit-0.3.3-py2.py3-none-any.whl.

File metadata

  • Download URL: aidevkit-0.3.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for aidevkit-0.3.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 894e5efba4823d6eeb1f4e56f251a4b90255c4613e9fc8b53b15e161173c7d48
MD5 c1e15838c26c27008205d6cc64c4afe5
BLAKE2b-256 7df003e9ca0cbf5ec8e5dd6503157a1af3d4f9f249d9e0863ae456816b4c6770

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page