Python
benbenls
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Python if 和 for 的多种写法
a, b, c = 1, 2, 3【对比Cpp里:c = a >b? a:b】这个写法,python只能常规的空行,缩进吗?人生苦短,我用python,下面介绍几种if的方便的方法。1.常规if a>b: c = aelse:...转载 2019-12-06 14:31:03 · 513 阅读 · 0 评论 -
Python中双冒号的作用[::]
Python中双冒号的作用[::]Python sequence slice addresses can be written as a[start:end:step] and any of start, stop or end can be dropped.Python序列切片地址可以写为[开始:结束:步长],其中的开始和结束可以省略range(n)生成[0,n)区间整数 rang...转载 2019-12-06 14:28:10 · 485 阅读 · 0 评论 -
Pytorch torch.cat与torch.chunk
部分内容摘自pytorch中文文档torch.cattorch.cat(inputs, dimension=0) → Tensor ,在给定维度上对输入的张量序列seq 进行连接操作。torch.cat()可以看做 torch.split() 和 torch.chunk()的反操作, cat() 函数可以通过下面例子更好的理解。参数:inputs (sequence of Tenso...原创 2019-11-08 15:34:18 · 3755 阅读 · 0 评论
分享