1、在pytorch中,有以下9种张量类型 2、查看张量的基本信息 tensor=torch.randn(3,4,5) print(tensor.size()) print(tensor.type()) print(tensor.dim()) torch.Size([3, 4, 5]) torch. ...
分类:
其他好文 时间:
2020-03-06 22:12:23
阅读次数:
129
1. git撤销已经push到远端的commit 现在本地回退到相应版本 // 注意使用 hard 参数会抛弃当前工作区的修改 // 使用 soft 参数的话会回退到之前的版本,但是保留当前工作区的修改,可以重新提交 为了覆盖掉远端的版本信息,使远端的仓库也回退到相应的版本,需要加上参数 force ...
分类:
其他好文 时间:
2020-03-04 19:11:54
阅读次数:
75
安装方法: Linux 安装脚本 以下指令假设已在 su 环境下,如果不是,请先运行 sudo su。 bash <(curl -L -s https://install.direct/go.sh) 此脚本会自动安装以下文件: /usr/bin/x2xxx/x2xxx:***** 程序; /usr/ ...
分类:
系统相关 时间:
2020-03-03 13:21:31
阅读次数:
92
A. Contest for Robots 1. 链接 "A. Contest for Robots" 2. 题意 共有n场比赛,A,B两人参赛,0表示本场比赛不得分,1表示得分。给出AB两人的比赛情况,请你制定每场比赛的得分(最低为1分),使得A的最终分数比B多且尽可能使两人分数相差不大,如果可以 ...
分类:
其他好文 时间:
2020-03-03 13:10:28
阅读次数:
49
"C Cow and Message" 对于字符串问题,如果对于下标进行操作复杂度很大的话,可以考虑对字母进行操作,这样计算复杂度的时候就是对26进行计算了。 ...
分类:
其他好文 时间:
2020-03-03 12:52:12
阅读次数:
76
"A Journey Planning" 题意: 有一列共 n 个城市, 每个城市有美丽值b[i], 要访问一个子序列的城市, 这个子序列相邻项的原项数之差等于美丽值之差, 求最大的美丽值总和. 思路: 对于一个合法的子序列, b[i] i 结果是一个定值, 统计该值取最大. view code i ...
分类:
其他好文 时间:
2020-03-02 00:58:32
阅读次数:
75
TMS Error "Extended transport control is not active: Cannot specify target client" STMS > Overview > Systems > double click on <SID> > select the 'Tra ...
分类:
其他好文 时间:
2020-02-28 22:36:14
阅读次数:
78
A - Score UVA - 1585 水 #include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; while(n--){ int sum=0; string s; cin>>s; int len=s.size ...
分类:
其他好文 时间:
2020-02-28 01:37:26
阅读次数:
71
题目链接 题解思路: 利用单调栈去找出每一个位置 i 左边第一个高度小于它的位置 L 和右边第一个高度小于它的位置 R ,然后在区间 (L,i] 所能取到的最大值即为h[ i ],这段区间对整体的贡献就是 (i - L) * h[ i ],对右边做同样处理,最后我们只需要找到它整体最大的那个位置即可 ...
分类:
其他好文 时间:
2020-02-27 21:01:38
阅读次数:
64
Basic knowledge: 1. Class VS Instance; class Student(object): def __init__(self, name, score): self.__name = name self.__score = score def print_score ...
分类:
编程语言 时间:
2020-02-27 01:07:23
阅读次数:
62