随笔分类 -  深度学习函数

摘要:编写项目文档 技术性写作的7条规则 分两步编写: 先聚焦于思想,然后审查和修整文档 先关注内容然后才是风格和清晰性 以读者为目标:谁将读这个文档? 在开始编写之前,要了解面向的读者 使用简单的风格:保持简单明了,使用良好的语法. 使用简单的句子,句子不用改长于两行 每个段落应该由3~4个句子组成,最 阅读全文
posted @ 2019-01-03 14:48 overfitover 阅读(176) 评论(0) 推荐(0)
摘要:python 错误处理与调试 错误处理 try: ​ ... except StandardError, e: ​ ... finally: ​ ... "参考文档" 调试 print assert logging pdb "参考文档" "参考文档" 阅读全文
posted @ 2019-01-03 10:07 overfitover 阅读(709) 评论(0) 推荐(0)
摘要:随机池化 import torch import torch.nn as nn from torch.autograd import Variable class StochasticPool2DLayer(nn.Module): def __init__(self, pool_size=2, ma 阅读全文
posted @ 2018-11-17 20:16 overfitover 阅读(435) 评论(0) 推荐(0)
摘要:这是SEnet 的特征融合部分, 注意: 暂时还不知道效果如何,可以测试一下。这个和cfe一样都是不改变shape的module,可以多关注一下。 阅读全文
posted @ 2018-11-16 16:53 overfitover 阅读(1839) 评论(0) 推荐(0)
摘要:cuda 安装与卸载 cuda安装 注意: 显卡驱动不要再安转了 examples可以不安转,这个是做验证的。 好像有教程不让安装opengl ,可以参考一下。 环境配置 根据你使用的shell对应编辑.bashrc或是.zshrc. 注意: 根据安转的cuda版本选择是8.0还是9.0. 检查 会 阅读全文
posted @ 2018-11-12 17:04 overfitover 阅读(3433) 评论(0) 推荐(0)
摘要:Pytorch Distributed 初始化方法参考文献https://pytorch.org/docs/master/distributed.html代码https://github.com/overfitover/pytorch-distributed... 阅读全文
posted @ 2018-11-06 11:15 overfitover 阅读(10544) 评论(2) 推荐(1)
摘要:pytorch 分布式训练参考文献https://pytorch.org/tutorials/intermediate/dist_tuto.html代码https://github.com/overfitover/pytorch-distributed欢迎来... 阅读全文
posted @ 2018-11-06 10:09 overfitover 阅读(1085) 评论(0) 推荐(0)
摘要:pytorch 多gpu训练用nn.DataParallel重新包装一下数据并行有三种情况前向过程device_ids=[0, 1, 2]model = model.cuda(device_ids[0])model = nn.DataParallel(mod... 阅读全文
posted @ 2018-11-05 10:59 overfitover 阅读(3451) 评论(0) 推荐(0)
摘要:pytorch demoimport torch.nn as nnimport torch.nn.functional as Ffrom torch.autograd import Variableimport torchimport torch.optim... 阅读全文
posted @ 2018-10-31 10:53 overfitover 阅读(8314) 评论(0) 推荐(0)
摘要:pytorch loss 参考文献: https://blog.csdn.net/zhangxb35/article/details/72464152?utm_source=itdadao&utm_medium=referral loss 测试 阅读全文
posted @ 2018-10-25 23:18 overfitover 阅读(6041) 评论(0) 推荐(0)
摘要:交叉熵 分类问题常用的损失函数为交叉熵(Cross Entropy Loss)。 交叉熵描述了两个概率分布之间的距离,交叉熵越小说明两者之间越接近。 原理这篇博客介绍的简单清晰: https://blog.csdn.net/xg123321123/article/details/52864830 总 阅读全文
posted @ 2018-10-25 22:21 overfitover 阅读(11715) 评论(0) 推荐(0)
摘要:tf.whereimport tensorflow as tftemp = tf.reshape(tf.range(0, 16) + tf.constant(1, shape=[16]), [4, 1, 2, 2])category_index = tf.w... 阅读全文
posted @ 2018-10-18 22:23 overfitover 阅读(515) 评论(0) 推荐(0)
摘要:NMS 非极大值抑制import tensorflow as tfimport numpy as nprects=np.asarray([[1,2,3,4],[1,3,3,4], [1,3,4,4],[1,1,4,4],[1,1,3,4]],dtype=np... 阅读全文
posted @ 2018-10-18 16:30 overfitover 阅读(169) 评论(0) 推荐(0)
摘要:线性函数预测import tensorflow as tfimport numpy as npimport matplotlib.pyplot as pltx_data = np.random.rand(100).astype(np.float32)y_da... 阅读全文
posted @ 2018-10-18 16:17 overfitover 阅读(316) 评论(0) 推荐(0)
摘要:huber losshuber loss 是一种优化平方loss的一种方式,使得loss变化没有那么大。import numpy as npimport matplotlib.pyplot as pltimport tensorflow as tfdef h... 阅读全文
posted @ 2018-10-13 21:10 overfitover 阅读(932) 评论(0) 推荐(0)