摘要:
直接卸载了1.2.1,然后重新安装了2.2.0 安装步骤:https://blog.csdn.net/weixin_42232041/article/details/106201692 cuda10.1 + cudnn : https://blog.csdn.net/mdllll/article/d 阅读全文
摘要:
对于plain net,当网络层次较深时,深层网络越难训练 inception net可以代替人工去选择卷积核的尺寸,需要需要用池化层 阅读全文
摘要:
等号左右两边代码一样,就是+ - 不一样 将x都移到左边 整数移到右边 class Solution { public: int change(string str) { if(str == "0") return 1; int len = str.length(); int ret = 0; fo 阅读全文
摘要:
用dp 如果matrices[i][j] == '0' dp[i][j] = 0 continue; 如果是左边界或者上边界 并且 dp[i][j] = 1; 否则 如果左 上 左上三个都是1 dp[i][j] = min(dp[i - 1][j - 1], dp[i][j - 1], dp[i - 阅读全文
摘要:
一个整型数组 nums 里除两个数字之外,其他数字都出现了两次。 请写程序找出这两个只出现一次的数字。要求时间复杂度是O(n),空间复杂度是O(1)。 关键是O(1)的空间复杂度 先对所有的值异或一下求得ans 则相同的两个数就会消去,又因为有两个不同的,因此ans的二进制必有一位为1 可以求出从右 阅读全文
摘要:
统计每个值所能获得的点数 dp 从终态考虑转移方程!!! dp[i][0]表示第i个数保留 dp[i][1]表示删除第i个数 dp[n][0] = dp[n - 1][1]; dp[n][1] = max(dp[n - 2][0], dp[n - 2][1]) + a[n]; class Solut 阅读全文
摘要:
class Solution { public: int reverse(int x) { // cout << 1111 << endl; long long ret = 0; long long y = x; int f = 0; if(y < 0) f = 1, y = -y; // cout 阅读全文
摘要:
/* // Definition for Employee. class Employee { public: int id; int importance; vector<int> subordinates; }; */ class Solution { public: int vis[10010 阅读全文
摘要:
用map统计边缘即可 最后求出哪个边缘出现次数cnt最多 返回n - cnt即可 class Solution { public: map<int, int> vis; set<int> s; int leastBricks(vector<vector<int>>& wall) { int n = 阅读全文
摘要:
map映射一下就好了 class Solution { public: // const int maxn = 30010; int vis[30010]; map<int, int> M; int singleNumber(vector<int>& nums) { int n = nums.siz 阅读全文