Skip to main content

一个常用的工具代码包集合

Project description

kevin_toolbox

一个通用的工具代码包集合

环境要求

numpy>=1.19
pytorch>=1.2

安装方法:

pip install kevin-toolbox  --no-dependencies

项目地址 Repo

使用指南 User_Guide

免责声明 Disclaimer

版本更新记录

  • v 1.2.8 (2023-11-13)【new feature】
    • data_flow.file.markdown
      • 【new feature】modify generate_table()
        • 支持两种输入模式(新增了第二种模式)
          1. 简易模式: content_s = {<title>: <list of value>, ...} 此时键作为标题,值作为标题下的一系列值。 由于字典的无序性,此时标题的顺序是不能保证的,若要额外指定顺序,请使用下面的 完整模式。
          2. 完整模式: content_s = {<index>: {"title": <title>,"values":<list of value>}, ...} 此时将取第 <index> 个 "title" 的值来作为第 <index> 个标题的值。values 同理。 该模式允许缺省某些 <index>,此时这些 <index> 对应的行/列将全部置空。
        • 部分兼容旧版的输入(对应于上面的简易模式),但是不再支持通过 ordered_keys 来指定简易模式下的标题顺序。若要实现类似功能,请直接使用 collections.OrderedDict 作为输入。
        • 支持通过 chunk_nums 和 chunk_size 参数实现表格的分割并列显示。
        • 支持通过 b_allow_misaligned_values 参数来允许不对齐的 values。
        • 支持通过 f_gen_order_of_values 来指定 values 的排序顺序。
        • 添加了对应的测试用例。
    • patches.for_numpy.linalg
      • 【new feature】modify softmax()
        • 新增了 temperature 参数,该参数起到对输入中的相对小/大值的抑制/增强作用。
        • 新增了 b_use_log_over_x 参数,用于简化 softmax(log(x)) 计算。
        • 添加了对应的测试用例。
    • nested_dict_list
      • 改造模块加载方式,不再支持通过x.y间接加载子模块,比如 nested_dict_list.serializer 等(相当于回退到1.2.6)
    • computer_science.algorithm.statistician
      • 进行重构,从 Average_Accumulator 和 Exponential_Moving_Average 中抽象出基类 Accumulator_Base。
      • 【new feature】在 Accumulator_Base 中增加了 load_state_dict() 和 state_dict() 接口用于加载和获取实例状态。
        • 增加了对应的测试用例。

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

kevin-toolbox-1.2.8.tar.gz (140.6 kB view hashes)

Uploaded Source

Built Distribution

kevin_toolbox-1.2.8-py3-none-any.whl (252.4 kB view hashes)

Uploaded Python 3

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