- 博客(485)
- 收藏
- 关注
转载 c++ Size capacity Resize reserve shrink_to_fit
转载于:https://www.cnblogs.com/zle1992/p/11191884.html
2019-07-15 22:07:00
276
转载 bash循环得到日期目录
1 #!/bin/bash 2 today=$(date "+%Y%m%d") 3 echo 'today is :'${today} 4 single_input="raw_data/" 5 6 7 startday=$(date "+%Y%m%d" -d '90 days ago') 8 endday=$(date "+%Y%...
2019-06-06 12:11:00
347
转载 Tensorflow --BeamSearch
github:https://github.com/zle1992/Seq2Seq-Chatbot1、 注意在infer阶段,需要需要reuse,2、If you are using theBeamSearchDecoderwith a cell wrapped inAttentionWrapper, then you must ensure that:The ...
2019-03-27 16:18:00
422
转载 377. Combination Sum IV
Given an integer array with all positive numbers and no duplicates, find the number of possible combinations that add up to a positive integer target.Example:nums = [1, 2, 3]target ...
2019-03-12 15:46:00
178
转载 216. Combination Sum III
Find all possible combinations ofknumbers that add up to a numbern, given that only numbers from 1 to 9 can be used and each combination should be a unique set of numbers.Note:Al...
2019-03-12 11:56:00
73
转载 jupyter notebook + frp 实现内容穿透
服务器上找到frps.ini配置如下[common]bind_port = 7000vhost_http_port = 8890要穿透的笔记本的frpc.ini配置[common]server_addr = 公网ipserver_port = 7000# 这个是设置ssh的,外网可以访问[ssh]type = tcplocal...
2019-03-07 17:47:00
270
转载 Seq2Seq ---学习笔记
应用场景:机器翻译与language model 不同MT model 的a<0> 是由encoder 生成的。language model 的 a<0> 是 初始化的。greedy search为什么不用 greedy search ?Beam Search B=3 的意思是,每次greed...
2019-03-07 15:17:00
121
转载 英文论文常用句子
ABSTRACT In this paper, we propose a novel Deep Reinforcement Learningframework for news recommendation . --------------Therefore, to address the aforementionedchallenges, we prop...
2019-03-05 20:42:00
212
转载 《DRN: A Deep Reinforcement Learning Framework for News Recommendation》强化学习推荐系统
摘要 新闻推荐系统中,新闻具有很强的动态特征(dynamic nature of news features),目前一些模型已经考虑到了动态特征。一:他们只处理了当前的奖励(ctr);、二:有一些模型利用了用户的反馈,如用户返回的频率。(user feedback other than click / no click labels (e.g., how freq...
2019-03-05 13:27:00
689
转载 304. Range Sum Query 2D - Immutable(动态规划)
Given a 2D matrixmatrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1,col1) and lower right corner (row2,col2).The above rectangle (with t...
2019-03-03 18:03:00
154
转载 303. Range Sum Query - Immutable(动态规划)
Given an integer arraynums, find the sum of the elements between indicesiandj(i≤j), inclusive.Example:Given nums = [-2, 0, 3, -5, 2, -1]sumRange(0, 2) -> 1sumRange(2, ...
2019-03-03 17:18:00
93
转载 279. Perfect Squares(动态规划)
Given a positive integern, find the least number of perfect square numbers (for example,1, 4, 9, 16, ...) which sum ton.Example 1:Input: n = 12Output: 3 Explanation: 12 = 4 + 4...
2019-02-27 22:39:00
133
转载 221. Maximal Square(动态规划)
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area.Example:Input: 1 0 1 0 01 0 1 1 11 1 1 1 1...
2019-02-26 20:08:00
73
转载 213. House Robber II(动态规划)
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this place arearranged in a circle.That means the firs...
2019-02-22 15:51:00
104
转载 152. Maximum Product Subarray(动态规划)
Given an integer arraynums, find the contiguous subarray within an array (containing at least one number) which has the largest product.Example 1:Input: [2,3,-2,4]Output: 6Expl...
2019-02-21 21:55:00
168
转载 151. Reverse Words in a String
Given an input string, reverse the string word by word.Example:Input: "the sky is blue",Output:"blue is sky the".Note:A word is defined as a sequence of non-space charact...
2019-01-22 14:01:00
95
转载 202. Happy Number
Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of ...
2019-01-20 15:31:00
80
转载 201. Bitwise AND of Numbers Range
Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive.Example 1:Input: [5,7]Output: 4Example 2:Inpu...
2019-01-20 14:29:00
69
转载 200. Number of Islands(DFS)
Given a 2d grid map of'1's (land) and'0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You...
2019-01-18 20:03:00
86
转载 DoubleDQN---tensorflow实现
完整代码:https://github.com/zle1992/Reinforcement_Learning_Game开山之作: 《Playing Atari with Deep Reinforcement Learning》(NIPS)http://export.arxiv.org/pdf/1312.5602《Human-leve...
2019-01-18 13:29:00
478
转载 133. Clone Graph(图的复制)
Given the head of agraph, return a deep copy (clone) of the graph. Each node in the graph contains alabel(int) and a list (List[UndirectedGraphNode]) of itsneighbors. There is an ed...
2019-01-17 21:04:00
158
转载 python deque
Deque objects support the following methods:append(x)¶Addxto the right side of the deque.appendleft(x)Addxto the left side of the deque.clear()Remove all elements from the deque l...
2019-01-17 16:18:00
161
转载 136. Single Number(位运算)
Given anon-emptyarray of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implem...
2019-01-16 15:26:00
67
转载 C++中位运算
简介1 位逻辑运算符: &(位 “与”) and ----------------- 2个都为1 才是1-----------0^0 = 0 , 0^1 = 0, 1^0 = 0 1^1= 1 ^(位 “异或”) ---------------------相同为0,不同为1--------0^0 = 0 , 1^1 = 0, 1...
2019-01-16 15:25:00
344
转载 anacoda 安装默认源中没有的包
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple1 安装失败conda install pygame2 搜索anaconda search -t conda pygame3 选则一个你想安装的版本anaconda show CogSci...
2019-01-15 20:24:00
236
转载 139. Word Break(动态规划)
Given anon-emptystringsand a dictionarywordDictcontaining a list ofnon-emptywords, determine ifscan be segmented into a space-separated sequence of one or more dictionary words....
2019-01-15 13:47:00
95
转载 tensorflow tensor 索引
问题:self.q_eval4next: (100,2)ix=【0,1,0,1---0,1】(100,1)我想取q_eval4next[:,idx] 1 #use_doubleQ 切片用!!!! 2 self.range_index = tf.placeholder(tf.int32,[None...
2019-01-14 21:36:00
198
转载 愤怒的小鸟强化学习
https://github.com/yenchenlin/DeepLearningFlappyBirdhttps://pypi.org/project/gym-tetris/https://github.com/openai/gym/wiki/Leaderboard#breakout-v0https://github.co...
2019-01-14 15:48:00
728
转载 强化学习--DeepQnetwork 的一些改进
Double DQN算Q值 与选Q值是分开的,2个网络。Multi-step Dueling DQN如果更新了,即使有的action没有被采样到,也会更新Q值Prioritized ReplyNoisy NetEpsilon Gre...
2019-01-14 15:10:00
186
转载 122. Best Time to Buy and Sell Stock II
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete as many transactions as you lik...
2019-01-12 12:04:00
75
转载 强化学习---TRPO/DPPO/PPO/PPO2
时间线:OpenAI 发表的Trust Region Policy Optimization,Google DeepMind 看过 OpenAI 关于 TRPO后, 2017年7月7号,抢在 OpenAI 前面 把Distributed PPO给先发布了.OpenAI 还是在 2017年7月20号 发表了一份拿得出手的PPO 论文。(ppo+ppo2)Pro...
2019-01-11 21:47:00
852
转载 强化学习---A3C
Asynchronous AdvantageActor-Critic (A3C)在RL任务中,我们本质上最终要学习的是策略(Policy)value-based方法:间接方法,即通过学习值函数(value function)或者动作值函数(action-value function)来得到policy。policy-based方法:直接对policy进行建模和学习,因此后...
2019-01-11 17:27:00
152
转载 119. Pascal's Triangle II
Given a non-negativeindexkwherek≤33, return thekthindex row of the Pascal's triangle.Note that the row index starts from0.In Pascal's triangle, each number is the sum of ...
2019-01-11 13:40:00
83
转载 118. Pascal's Triangle
Given a non-negative integernumRows, generate the firstnumRowsof Pascal's triangle.In Pascal's triangle, each number is the sum of the two numbers directly above it.Example:I...
2019-01-11 13:18:00
72
转载 93. Restore IP Addresses
Given a string containing only digits, restore it by returning all possible valid IP address combinations.Example:Input: "25525511135"Output: ["255.255.11.135", "255.255.111.35"...
2019-01-10 22:49:00
83
转载 python ---多进程 Multiprocessing
和 threading 的比较多进程 Multiprocessing 和多线程 threading 类似, 他们都是在 python 中用来并行运算的. 不过既然有了 threading,为什么 Python 还要出一个 multiprocessing 呢? 原因很简单, 就是用来弥补 threading 的一些劣势, 比如在 threading教程中提到的GIL....
2019-01-10 22:25:00
123
转载 python ---多线程thread
thread 在数据预处理的时候用处不大,因为有GIL 锁查看thread信息1 import threading2 print(threading.current_thread())3 print(threading.enumerate())4 print(threading.active_count())定义thread job并开启...
2019-01-10 19:00:00
107
转载 强化学习--DDPG---tensorflow实现
完整代码:https://github.com/zle1992/Reinforcement_Learning_Game论文《Continuous control with deep reinforcement learning》https://arxiv.org/pdf/1509.02971.pdfDeep_Deterministic_Policy_GradientDDPG...
2019-01-09 22:41:00
1013
转载 强化学习--Actor-Critic---tensorflow实现
完整代码:https://github.com/zle1992/Reinforcement_Learning_GamePolicy Gradient 可以直接预测出动作,也可以预测连续动作,但是无法单步更新。QLearning先预测出Q值,根据Q值选动作,无法预测连续动作、或者动作种类多的情况,但是可以单步更新。一句话概括 Actor Critic 方法:结...
2019-01-09 12:12:00
554
转载 79. Word Search
Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or...
2019-01-09 10:18:00
88
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人