pytorch
深度学习框架
蜉蝣之羽,衣裳楚楚
虽千万人吾往矣
展开
-
Ubuntu16.04 安装pytorch
1.下载anacondahttps://www.anaconda.com/products/individual#linux2.安装ancondabash Anaconda3-2020.02-Linux-x86_64.shenter -------------------------------3.下载pytorchgit clonepytorch/pytorch4.创建虚拟环境conda create -n your_virtualenv_name python=3.7..原创 2020-12-26 18:37:04 · 129 阅读 · 0 评论 -
Pytorch hook(钩子函数)
# example # 定义用于获取网络各层输入输出tensor的容器,并定义module_name用于记录相应的module名字module_name = []features_in_hook = []features_out_hook = []# hook函数负责将获取的输入输出添加到feature列表中,并提供相应的module名字# fea_in当前forward 的输入,fea_out当前forward的输出def hook(module, fea_in, fea_out): .原创 2020-12-26 18:31:49 · 465 阅读 · 0 评论 -
模型量化(Model Quantization)
Tensorflow Model QuantizationQuantizing deep convolutional networks for efficient inference: A whitepaper推理加速库:GEMMLOWP , Intel MKL-DNN , ARM CMSIS , Qualcomm SNPE , Nvidia TensorRT降低模型复杂度的方法->降低权重和激活输出的精度要求-----int8,int16量化1.优点无需重训练 几乎不会有精度损原创 2020-12-25 00:56:09 · 1085 阅读 · 0 评论