GithubHelp home page GithubHelp logo

dumpmemory / my-tools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from renshuhuai-andy/my-tools

0.0 0.0 0.0 2.57 MB

my commonly-used tools

Shell 0.32% Python 0.40% Jupyter Notebook 99.21% TeX 0.08%

my-tools's Introduction

My Tools

常用的一些轮子

shell script

python script

visualization
训练可视化
结果可视化
pytorch
printer
  • logger.py:使用 logging 模块同时将日志打印到终端和文件。
cuda_memory_tracker

参考:https://github.com/Oldpan/Pytorch-Memory-Utils

  • model_size_estimate.py:估计 pytorch 模型参数和中间变量所占显存的大小。
  • gpu_mem_track.py:精确跟踪 pytorch 模型的显存使用情况(需要安装 NVIDIA 的 python 环境库 pynvml:pip install nvidia-ml-py3,或 conda install -c conda-forge pynvml)。
  • examples.py:对于 gpu_mem_track.py 的使用示例。

另一种监控显存的方法:Pytorch Profiler

PyTorch显存机制分析 - Connolly的文章 - 知乎

configargparse

统一了命令行参数、配置文件、环境变量等设置,并创建为单例模式,使得它们在代码的任何地方都可以通过 Config.get_instatnce() 被导入和使用。

另一种指定实验配置的方法:Sacred

other
  • hook.py:使用 pytorch hook 获取中间层变量的值和梯度。
  • get_batch.py:获取一个 batch_siez 的 data。
  • time.py:计算程序运行时间。
  • model_stats.py:打印模型状态,包括参数名、参数量、显存开销、Flops、激活张量的大小等。
  • multi_process.py:多进程的使用示例。

latex

v2ray script

  • README.md:v2ray的相关命令、配置、阅读材料。

my-tools's People

Contributors

renshuhuai-andy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.