上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 21 下一页
摘要: import os import torch from d2l import torch as d2l # @save d2l.DATA_HUB['fra-eng'] = (d2l.DATA_URL + 'fra-eng.zip', '94646ad1522d915e7b0f9296181140ed 阅读全文
posted @ 2023-09-11 19:58 o-Sakurajimamai-o 阅读(87) 评论(0) 推荐(0)
摘要: //FZ44 只出现一次的牛II //class Solution { //public: // vector<int> findSingleCowsII(vector<int>& nums) { // vector<int>a; // int res=0; // map<int,int>mp; / 阅读全文
posted @ 2023-09-11 18:42 o-Sakurajimamai-o 阅读(27) 评论(0) 推荐(0)
摘要: import torch from torch import nn from d2l import torch as d2l batch_size, num_steps = 32, 35 train_iter, vocab = d2l.load_data_time_machine(batch_siz 阅读全文
posted @ 2023-09-09 18:17 o-Sakurajimamai-o 阅读(284) 评论(0) 推荐(0)
摘要: 声明一个multiset,按升序排列,默认升序排列 multiset<int>set1; 等价于: 或 multiset<int,less<int>>set1; 声明一个multiset,按降序排列 multiset<int, greater<int>>set1; 函数 用法 作用insert() 阅读全文
posted @ 2023-09-06 14:07 o-Sakurajimamai-o 阅读(25) 评论(0) 推荐(0)
摘要: 从零开始实现RNN: import math import torch from torch import nn from torch.nn import functional as F import matplotlib.pyplot as plt from d2l import torch as 阅读全文
posted @ 2023-09-05 20:46 o-Sakurajimamai-o 阅读(66) 评论(0) 推荐(0)
摘要: $Class 1$ : public class Main { public static void main(String[] args) { System.out.printf("Hello and welcome!\n"); double x=0.3d; //后缀要加d或者f或者l boole 阅读全文
posted @ 2023-09-05 18:44 o-Sakurajimamai-o 阅读(29) 评论(0) 推荐(0)
摘要: 节点(Node):树形结构中的基本单位,可以表示数据元素或对象。节点可以包含一个或多个子节点。 根节点(Root Node):树的顶层节点,它没有父节点,是整个树的起点。 子节点(Child Node):树中每个节点都可以有零个或多个子节点,子节点是位于其父节点下方的节点。 父节点(Parent N 阅读全文
posted @ 2023-09-05 12:14 o-Sakurajimamai-o 阅读(79) 评论(0) 推荐(0)
摘要: 状态压缩也就是把多个状态都转译成一个状态,由于题目的题意就是需要一步一步递推也就是dp,但是常规的dp只能计算一个状态,无法满足多个状态,所以可以使用状态压缩. 将这多个状态划分为二进制形式:设有$m$个状态,那么所有的可能状态为 $2^m$ ,如果有4个状态,$0010$ 表示只满足了第二个状态, 阅读全文
posted @ 2023-09-02 17:36 o-Sakurajimamai-o 阅读(79) 评论(0) 推荐(0)
摘要: //容斥原理 //时间复杂度O(2^n-1) #include<bits/stdc++.h> #define int long long using namespace std; const int N=2e6+10; int n,m,res,p[N]; signed main() { cin>>n 阅读全文
posted @ 2023-08-30 12:21 o-Sakurajimamai-o 阅读(152) 评论(0) 推荐(0)
摘要: 循环神经网络 from mxnet import nd x, w_xh = nd.random.normal(shape=(3, 1)), nd.random.normal(shape=(1, 4)) h, w_hh = nd.random.normal(shape=(3, 4)), nd.rand 阅读全文
posted @ 2023-08-27 16:57 o-Sakurajimamai-o 阅读(54) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 21 下一页
-- --