- 博客(5)
- 收藏
- 关注
转载 【转】深度学习,大家都看哪些社区论坛?
深度学习,大家都看哪些社区论坛? - 光头老K的文章 - 知乎 https://zhuanlan.zhihu.com/p/157202860
2020-08-02 19:15:20
574
转载 pytorch 获取模型参数量
# Find total parameters and trainable parameterstotal_params = sum(p.numel() for p in model.parameters())print(f'{total_params:,} total parameters.')total_trainable_params = sum( p.numel() for p in model.parameters() if p.requires_grad)print(f'{to.
2020-07-26 08:38:30
963
原创 用cProfile和pstates查询程序各模块运行时间
运行:CUDA_VISIBLE_DEVICES=0 python -m cProfile -o cplx.out cplx_train.py查询:python -c "import pstats; p=pstats.Stats('cplx.out'); p.print_stats()" | more
2020-07-23 18:33:53
240
转载 cProfile使用
引用:https://www.cnblogs.com/kaituorensheng/p/4453953.htmlPython自带了几个性能分析的模块:profile、cProfile和hotshot,使用方法基本都差不多,无非模块是纯Python还是用C写的。本文介绍cProfile。例子:import timedef func1():sum = 0for i in range(1000000):sum += idef func2():time.sleep(10)func1()func
2020-06-15 11:59:14
1764
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人