摘要: 1、tf.Session self._session = None opts = tf_session.TF_NewSessionOptions(target=self._target, config=config) try: # pylint: disable=protected-access s 阅读全文
posted @ 2019-02-28 15:38 猫薄荷喂狗 阅读(856) 评论(0) 推荐(0) 编辑
摘要: CRF 许多随机变量组成一个无向图G = {V, E},V代表顶点,E代表顶点间相连的边, 每个顶点代表一个随机变量,边代表两个随机变量间存在相互影响关系(变量非独立), 如果随机变量根据图的结构而具有对应的条件独立性, 具体来说,两个没有边连接随机变量V1、V2,在其它随机变量O都确定的情况下,是 阅读全文
posted @ 2018-12-28 15:46 猫薄荷喂狗 阅读(2084) 评论(0) 推荐(0) 编辑
摘要: classtorch.nn.RNN(*args, **kwargs) input_size – The number of expected features in the input x hidden_size – The number of features in the hidden stat 阅读全文
posted @ 2018-05-04 16:19 猫薄荷喂狗 阅读(7479) 评论(0) 推荐(0) 编辑
摘要: 一、计算图简介 在pytorch的官网上,可以看到一个简单的计算图示意图, 如下。 这个图里有两种节点:Variable节点和Function节点,Variable记录运算数据,Function记录运算操作。其中Variable节点又可以分为叶节点和非叶节点两类。叶节点由用户直接创建产生,而非叶节点 阅读全文
posted @ 2018-04-09 16:21 猫薄荷喂狗 阅读(17348) 评论(1) 推荐(2) 编辑
摘要: 廖雪峰的python教程有python元类编程示例,综合代码如下 https://www.liaoxuefeng.com/wiki/0014316089557264a6b348958f449949df42a6d3a2e542c000/0014319106919344c4ef8b1e04c48778b 阅读全文
posted @ 2018-03-29 14:42 猫薄荷喂狗 阅读(229) 评论(0) 推荐(0) 编辑
摘要: Programming guide http://docs.nvidia.com/cuda/cuda-c-programming-guide/ Best Practices guide http://docs.nvidia.com/cuda/cuda-c-best-practices-guide/ 阅读全文
posted @ 2018-03-23 14:41 猫薄荷喂狗 阅读(92) 评论(0) 推荐(0) 编辑
摘要: https://codeyarns.com/2011/03/02/how-to-do-error-checking-in-cuda/ Error checks in CUDA code can help catch CUDA errors at their source. There are 2 s 阅读全文
posted @ 2018-03-23 14:15 猫薄荷喂狗 阅读(4248) 评论(0) 推荐(0) 编辑
摘要: https://devblogs.nvidia.com/cuda-pro-tip-write-flexible-kernels-grid-stride-loops/ One of the most common tasks in CUDA programming is to parallelize 阅读全文
posted @ 2018-03-22 14:14 猫薄荷喂狗 阅读(493) 评论(0) 推荐(0) 编辑
摘要: THLongStorage *THTensor_(newSizeOf)(THTensor *self); THLongStorage *THTensor_(newStrideOf)(THTensor *self); 把THTensor的size/stride数据提取出来,赋值给一个新的THLongS 阅读全文
posted @ 2018-03-05 12:01 猫薄荷喂狗 阅读(1621) 评论(0) 推荐(0) 编辑
摘要: cmake在windows上自动寻找v140(VS2015)的编译器,现在只有VS2013的IDE,所以要修改编译器 修改掉VS2015的编译器名称,报错提示参数CMAKE_C_COMPILER和CMAKE_CXX_COMPILER参数的对应地址找不到 在CMakeLists.txt里显式设置这两个 阅读全文
posted @ 2018-02-09 18:03 猫薄荷喂狗 阅读(627) 评论(0) 推荐(0) 编辑