上一页 1 2 3 4 5 6 7 8 9 10 ··· 56 下一页

2022年9月20日

摘要: 目录: Vanilla Seq2Seq理论 引言 Seq2Seq网络即sequence to sequence,序列到序列网络,输入一个序列,输出另一个序列。这个架构重要之处在于,输入序列和输出序列的长度是可变的。 Seq2Seq使用的具体方法基本都属于编码器-解码器架构。 其核心思想是: 通过编码 阅读全文
posted @ 2022-09-20 23:31 朴素贝叶斯 阅读(1083) 评论(1) 推荐(0) 编辑
摘要: KL散度 KL散度,又叫相对熵,用于衡量两个分布之间的距离。设$p(x),q(x)$是关于随机变量$x$的两个分布,则$p$相对于$q$的KL散度为: 信息论中,熵$H(P)$表示对来自$P$的随机变量进行编码所需的最小字节数, 而交叉熵$H(P,Q)$则表示使用基于$Q$的编码对来自$P$的变量进 阅读全文
posted @ 2022-09-20 21:39 朴素贝叶斯 阅读(1527) 评论(0) 推荐(0) 编辑
摘要: torch.nonzero(input, *, out=None, as_tuple=False) → LongTensor or tuple of LongTensors 输入是一维张量,返回一个包含输入 input 中非零元素索引的张量,输出张量中的每行包含 input 中非零元素的索引,输出是 阅读全文
posted @ 2022-09-20 21:17 朴素贝叶斯 阅读(375) 评论(0) 推荐(0) 编辑
摘要: 第一个版本: torch.max(input) → Tensor Returns the maximum value of all elements in the input tensor. >>> a = torch.randn(1, 3) >>> a tensor([[ 0.6763, 0.74 阅读全文
posted @ 2022-09-20 21:00 朴素贝叶斯 阅读(50) 评论(0) 推荐(0) 编辑
摘要: torch.Tensor.index_fill_(dim, index, value) → Tensor Fills the elements of the self tensor with value value by selecting the indices in the order give 阅读全文
posted @ 2022-09-20 16:37 朴素贝叶斯 阅读(197) 评论(0) 推荐(0) 编辑
摘要: torch.Tensor.fill_(value) → Tensor Fills self tensor with the specified value. 阅读全文
posted @ 2022-09-20 08:21 朴素贝叶斯 阅读(90) 评论(0) 推荐(0) 编辑

2022年9月17日

摘要: torch.triu(input, diagonal=0, *, out=None) → Tensor Returns the upper triangular(上三角) part of a matrix (2-D tensor) or batch of matrices input, the ot 阅读全文
posted @ 2022-09-17 22:51 朴素贝叶斯 阅读(249) 评论(0) 推荐(0) 编辑
摘要: torch.Tensor.masked_fill_(mask, value) Fills elements of self tensor with value where mask is True. The shape of mask must be broadcastable with the s 阅读全文
posted @ 2022-09-17 16:55 朴素贝叶斯 阅读(178) 评论(0) 推荐(0) 编辑
摘要: C++函数模板(Function Template) 值(Value)和类型(Type)是数据的两个主要特征,它们在C++中都可以被参数化。 所谓函数模板, 实际上是建立一个通用函数,(个人:也就是说这个函数要执行的逻辑操作是通用的,框架是一致的,对于里面用到的类型,切换到另一种类型,逻辑操作依然正 阅读全文
posted @ 2022-09-17 10:23 朴素贝叶斯 阅读(148) 评论(0) 推荐(0) 编辑

2022年9月16日

摘要: C++11 是第二个真正意义上的 C++ 标准,也是 C++ 的一次重大升级。C++11 增加了很多现代编程语言的特性,比如,自动类型推导、智能指针、lambda表达式等,这使得 C++ 看起来又酷又潮,一点也不输 Java 和 C#。虽然学习 C++11 需要花些时间,但这是非常值得的;C++11 阅读全文
posted @ 2022-09-16 23:58 朴素贝叶斯 阅读(274) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 56 下一页

导航