Tensor import torch x = torch.ones(2, 2, requires_grad=True) # 将其属性.requires_grad设置为True,它将开始追踪(track)在其上的所有操作。完成计算后,可以调用.backward()来完成所有梯度计算 print(x) ...
分类:
其他好文 时间:
2019-11-30 13:48:29
阅读次数:
102
1.查找/替换方向:Direction Forward:向前 Backward:向后 2.范围:Scope All:全部(当前文件) Selected lines:选中的几行 3.选项:Options Case sensitive:区分大小写 Wrap search:查找/替换到文件最底部可回到文件 ...
分类:
系统相关 时间:
2019-11-28 01:44:52
阅读次数:
111
要得到最终的和,第一行每个数字出现的(及被加的)次数正好为一个杨辉三角,所以直接枚举第一行就可以了 AC代码: 1 #include <iostream> 2 #include <cstdio> 3 #include <algorithm> 4 5 using namespace std; 6 7 ...
分类:
其他好文 时间:
2019-11-25 09:51:14
阅读次数:
67
链接: https://codeforces.com/contest/1251/problem/B 题意: A palindrome is a string t which reads the same backward as forward (formally, t[i]=t[|t|+1?i] f ...
分类:
其他好文 时间:
2019-11-01 20:42:06
阅读次数:
126
一、计算图 1、计算图是用于描述运算的有向无环图。 主要有两个元素:结点(Node)、边(edge) 结点表示数据,如向量、矩阵、张量 边表示运算,如加减乘除卷积等 结点表示数据,如向量、矩阵、张量 边表示运算,如加减乘除卷积等 例子:用计算图表示 y = (x + w) * (w + 1) 拆分: ...
分类:
其他好文 时间:
2019-10-16 09:40:50
阅读次数:
276
杨辉三角的带权应用,杨辉三角用组合数推,(记得从二开始),什么数组该赋什么值想好了再写 ...
分类:
其他好文 时间:
2019-10-08 10:59:38
阅读次数:
99
https://forward-backward.co.jp/ldoce5viewer/https://github.com/jiedo/ldoce5viewer-pyqt5.gitapt install python-pyqt5.qtwebkit ...
分类:
其他好文 时间:
2019-10-06 00:54:27
阅读次数:
97
9. Palindrome Number Easy Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example ...
分类:
其他好文 时间:
2019-09-15 01:20:34
阅读次数:
92
当需要把视频跳转到N秒的时候可以使用下面的方法:int64_t timestamp = N * AV_TIME_BASE; av_seek_frame(fmtctx, index_of_video, timestamp, AVSEEK_FLAG_BACKWARD); av_get_channel_l ...
分类:
其他好文 时间:
2019-09-05 23:30:37
阅读次数:
94
题目描述 Determine whether an integer is a palindrome. An integer?is?a?palindrome when it?reads the same backward as forward. Example 1: Input: 121 Output ...
分类:
其他好文 时间:
2019-09-01 21:26:15
阅读次数:
100