4 zjy2015302395

尚未进行身份认证

我要认证

ACM要AC

等级
TA的排名 2w+

pytorch入门(3)

语言模型lstmimport torchtextfrom torchtext.vocab import Vectorsimport torchimport numpy as npimport randomBATCH_SIZE = 32EMBEDDING_SIZE = 100MAX_VOCAB_SIZE = 5000import torch.nn as nnclass RNNModel(nn.Module): def __init__(self, rnn_type,vocab_

2020-05-23 13:49:02

pytorch入门(2)

fizzbuzz游戏3倍数fizz 5倍数buzz 15倍数fizzbuzz。其余数字输出本身12fizz4buzzfizz78fizzbuzz11fizz1314fizzbuzzdef fizz_buzz_encode(i): if i %15 == 0 : return 3 elif i%5 == 0 : return 2 elif i %3 == 0: return 1 else: return 0def fizz_buzz_de

2020-05-20 17:05:00

pytorch入门(1)

import torchimport numpy as npN, D_in, H, D_out = 64,1000,100,10x = torch.randn(N,D_in)y = torch.randn(N,D_out)w1 = torch.randn(D_in, H,requires_grad = True)w2 = torch.randn(H,D_out,requires_grad = True)learning_rate = 1e-6for t in range(500):

2020-05-20 00:50:29

Learning Local Search Heuristics for Boolean Satisfiability 2020-04-30

Learning Local Search Heuristics for Boolean SatisfiabilityAbstractGNN (select variable) + local search algorithm.RL,初始X,GNN结合sofetmax作为policy 函数,选择p最大的variable翻转,每个Trajectory有一个reward(找到使得fai为真的reward为1),训练参数。SAT problem: 属于[决定性问题],也是第一个被证明属于[NP完全]命

2020-05-17 03:26:00

LEARNING A SAT SOLVER FROM SINGLE-BIT SUPERVISION 2020-05-01

LEARNING A SAT SOLVER FROM SINGLE-BIT SUPERVISIONAbstractNeuroSAT : a classifier to predict satisfiability of a propositional formulatrain NN ,2* LSTM+3* MLP (每个t : literal & variable 相互更新)监督学习, 二分类器。contribution:虽然结果一般,但是用监督学习的过程中,运用可视化发现,sat时可以发

2020-05-17 03:25:13

NLocalSAT: Boosting Local Search with Solution Prediction 2020-05-02

NLocalSAT: Boosting Local Search with Solution PredictionAbstractNLocalSAT :address stochastic local search (SLS) 随机初始化的问题NLocalSAT combines SLS with a solution prediction model, which boosts SLS by changing initialization assignments with a neural net

2020-05-17 03:24:20

Guiding High-Performance SAT Solvers with Unsat-Core Predictions 2020-05-03

Guiding High-Performance SAT Solvers with Unsat-Core PredictionsAbstractNeuroSAT is a method to improve CDCL solvers with predictions of unsat-cores.can provide effective guidance to high-performance SAT solvers on real problems.代码: https://github.com/

2020-05-17 03:23:27

PDP: A General Neural Framework for Learning Constraint Satisfaction Solvers2020-05-04

PDP: A General Neural Framework for Learning Constraint Satisfaction SolversAbstractit is not clear how the search strategy in the learned models actually works. So propose a generic neural framework to solve CSP( constraint satisfaction problems) in a f

2020-05-17 03:22:36

Combinatorial Optimization with Graph Convolutional Networks and Guided Tree Search 2020-05-05

Combinatorial Optimization with Graph Convolutional Networks and Guided Tree Search图上常见np问题Abstractestimate the likelihood, for each vertex in a graph, of whether this vertex is part of the optimal solution.设计network 综合各种方案IntroductionGCN学习每个点的like

2020-05-17 03:21:42

Learning Combinatorial Optimization Algorithms over Graphs 2020-05-06

Learning Combinatorial Optimization Algorithms over GraphsAbstract解决NP-hard问题通常需要大量的专业知识和反复试验, learn algorithm to automate this challenging, tedious process. learn heuristic algorithm利用结构特征解决问题. (same structure but differ in the data)的性质,RL + graph embe

2020-05-17 03:20:24

NEURAL COMBINATORIAL OPTIMIZATION WITH REINFORCEMENT LEARNING 2020-05-07

NEURAL COMBINATORIAL OPTIMIZATION WITH REINFORCEMENT LEARNINGAbstract(借用pointer network用 policy gradient 优化,)given a set of city coordinates, predicts a distribution over different city permutations.RL(reward 总路径长度相反数) + RNN (policy gradient)很好的解决100no

2020-05-17 03:18:59

ATTENTION, LEARN TO SOLVE ROUTING PROBLEMS 2020-05-09

ATTENTION, LEARN TO SOLVE ROUTING PROBLEMSAbstract问题描述车辆路径问题(Vehicle Routing Problem, VRP), 车辆路线问题最早是由Dantzig和Ramser于1959年首次提出,它是指一定数量的客户,各自有不同数量的货物需求,配送中心向客户提供货物,由一个车队负责分送货物,组织适当的行车路线,目标是使得客户的需求得到满足,并能在一定的约束下,达到诸如路程最短、成本最小、耗费时间最少等目的。Daima:https://g

2020-05-17 03:18:16

On Learning Combinatorial Patterns to Assist Large-Scale Airline Crew Pairing Optimization 2020-0...

On Learning Combinatorial Patterns to Assist Large-Scale Airline Crew Pairing OptimizationAbstractCPO :: 设计 legal flight sequence (crew pairings),以最低的成本设计出航空公司的航班时间表机组指派问题需要考虑时间变量以及后续的事件,比如a机组从北京飞到上海就只能飞上海的航班了,而且人家还必须回到北京,这个问题的复杂度就大多了。类似的还有登机口指派问题。机组排

2020-05-17 03:17:09

Attention is all you need 2020-05-15

Attention is all you need AbstractTransformer : 无recurrence和convolutions,只基于attentionIntroductionRecurrent models 是seq2seq model,h_t = f (position,h_t-1);不能并行运算,RNN 长期忘记,transformer: averaging attention-weighted positionsSelf-attention : relating d

2020-05-17 03:14:05

sgu 273Game Po (区间dp)

题意:4种颜色,两个混合可以组成另一种,给出所有组合以及组合后的结果,给一串颜色,任意位置合并最后合并成一个颜色的所有可能性tip:dp[I][j][k]表示从I到j是否可以变成第k个颜色,注意可能有同样两种颜色组合,但形成不一样的颜色,所以我用了前向星把他们连起来,而且从I到j形成的颜色也可能是多个,也用了前向星,循环中间位置m 枚举I到m和m+1到j可能形成的颜色 在循环这两个颜色组成的颜色,就

2017-09-27 16:56:42

判断线段相交并求交点

const double precision = 1e-6;const double inf = (1<<30);const int maxn = 1e6+10;int n;struct Tpoint{ double x; double y; Tpoint(double x = 0, double y = 0) : x(x) , y(y) { } void pr

2017-09-25 21:28:45

sgu-264. Travel 稳定婚姻问题

题意:男女配对,最后没有一对男女对对方的喜欢程度都高于现在的配偶tip:感觉和二分图差不多嘛。所有男的放队列 一个个出来, 先找最喜欢的,要是她单身就结婚 不单身就问她要不要私奔 私奔了原来配的就又单身 放入队列#include <cstdio>#include <iostream>#include <algorithm>#include <map>#include <cstring

2017-09-22 01:08:01

sgu265Wizards(计算几何)

题意:一个空间直角坐标系内,对一个点有三种操作: 1.平移(x,y,z)⇒(x+a,y+b,z+c); 2.缩放(x,y,z)⇒(ax,by,cz); 3.绕一个向量(x,y,z)顺时针旋转α角(角度制)。 对空间内的m个点给出n个操作,求每个点在操作后的坐标。tip:每次操作在之前的基础上左乘当前操作的矩阵,最后右乘每次给的初始坐标。#include <cstdio>#include <io

2017-09-22 00:56:33

sgu258 Almost Lucky Numbers (数位dp)

题意:定义一个具有2n位的正整数,其前n位之和与后n位之和相等,则为lucky数。给定一个区间l,r,问有多少个正数可以通过修改某一位数从而变成lucky数?不能含前导0。tip:定义dp[i][j][p][q]表示前I位和为j其中数位上最大值是p 最小值是q的方案数。。 我们先把整个区间分开,10,99],[1000,9999],[100000,999999]。。。 然后如果[1,K]完全包含

2017-09-18 11:23:57

SGU 271 Book Pile(deque)

题意:一开始桌子上从上到下放着N本书(从上往下输入) M组操作: 1.将前K本书翻转,2.在头上加一本书。最后输出书的顺序。(从上往下输出)tip:看起来像splay==线性做法是用deque 上面k本维护一个。。下面的一次往上添加,每次遇到add先加到上面的deque里,如果超过了k本,拿下最下面的给到另一个deque。。。需要注意的是,本题减小时间复杂度的突破口就是如何不真的旋转,而能做到

2017-09-14 11:34:56

查看更多

勋章 我的勋章
  • 持之以恒
    持之以恒
    授予每个自然月内发布4篇或4篇以上原创或翻译IT博文的用户。不积跬步无以至千里,不积小流无以成江海,程序人生的精彩需要坚持不懈地积累!
  • 勤写标兵Lv4
    勤写标兵Lv4
    授予每个自然周发布9篇以上(包括9篇)原创IT博文的用户。本勋章将于次周周三上午根据用户上周的博文发布情况由系统自动颁发。