- 博客(23)
- 资源 (36)
- 收藏
- 关注
原创 python 手动打乱数据集
x_train, y_train = np.array(x_train),np.array(y_train) index = [i for i in range(len(y_train))] np.random.shuffle(index) x_train = x_train[index] y_train = y_train[index]
2019-04-29 16:54:18 7142
原创 python 自定义 log_info
用全局变量 LOGINFO 来控制 printLOGINFO = True # 开启logdef log_info(*args): if LOGINFO: for i in args: print(i,end=' ') print()
2019-04-29 14:31:19 7831
原创 pytorch 初试
import torchimport torchvisionimport torchvision.transforms as transformsdevice = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")# Assuming that we are on a CUDA machine, this sho...
2019-04-23 16:34:48 6172 1
原创 Numpy 实现神经网络
#coding:utf-8import numpy as np #定义激活函数和他们的导数 def tanh(x): return np.tanh(x) def tanh_deriv(x): return 1.0 - np.tanh(x)**2 def logistic(x): return 1/(1 + np.exp(-x...
2019-04-09 20:07:18 7595
原创 利用 SIFT 实现图像拼接
任务如下,将两张同一视点不同视角的图片合并class Stitcher: # 拼接函数 def stitch(self, images, ratio=0.75, reprojThresh=4.0, showMatches=False): # 获取输入图片 (imageB, imageA) = images # 检测A、B图片的SI...
2019-04-09 18:31:23 18173 24
原创 opencv-py 中使用 sift
安装 opencv-contrib-python==3.4.0.14:(py36) >>> pip install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-contrib-python==3.4.0.14Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/si...
2019-04-09 17:41:20 4263
原创 opencv-py 读取中文路径的图片 返回 None
解决方案:改用 numpy.fromfile() 读取图片# imreadimg = cv2.imdecode(np.fromfile(u'x:/中文路径/xx.jpg', dtype=np.uint8), flags) #flags=cv2.IMREAD_COLOR...#imwritecv2.imencode('.jpg', img)[1].tofile(u'x:/中文路径/xx.j...
2019-04-04 11:28:27 2643
原创 【强化学习】 A3C MountainCarContinuous
import gymimport multiprocessingimport threadingimport numpy as npimport osimport shutilimport matplotlib.pyplot as pltimport tensorflow as tf# number of worker agentsno_of_workers = multipr...
2019-04-03 23:27:40 4091
原创 能控
对线性系统:X˙=AX+BU\dot X = AX+BUX˙=AX+BU状态 x0x_0x0 能控:∃t1>t0,∃u(t),t∈[t0,t1]s.t.X(t0)=x0,X(t1)=0 \\ \exist t_1>t_0,\\ \exists u(t),t\in[t_0,t_1] \\ s.t. X(t_0) = x_0, X(t_1) = 0∃t1&...
2019-04-03 18:59:13 2323
原创 循环不变子空间
包含集合 W 的最小 A 不变子空间:<A∣W>=W+AW+A2W+...+An−1W=R(Qc)<A|W> = W+AW+A^2W+...+A^{n-1}W = R(Q_c)<A∣W>=W+AW+A2W+...+An−1W=R(Qc)其中 Qc=[W,AW,A2W,...,An−1W]Q_c = [W, AW, A^...
2019-04-03 17:29:44 3518
原创 【强化学习】A3C
一个可用的 A3C,有待研究from: https://github.com/stefanbo92/A3C-Continuousimport gymimport multiprocessingimport threadingimport numpy as npimport osimport shutilimport matplotlib.pyplot as pltimport t...
2019-04-03 12:00:24 2067
原创 【强化学习】DQN
不知道哪有问题的DQNimport numpy as npimport gymimport tensorflow as tffrom tensorflow.contrib.layers import flatten, conv2d, fully_connectedfrom collections import deque, Counterimport randomfrom datet...
2019-04-03 11:39:42 2027 1
原创 【强化学习】Q-learning
import randomimport matplotlib.pylab as plt#%matplotlib inlineimport gymenv = gym.make('Taxi-v1')env.render()print(env.observation_space.n)print(env.action_space.n)5006q = {}for s in ...
2019-04-02 21:54:59 1758
原创 【强化学习】First-visit MC prediction
在未知环境的条件下,通过反复模拟获得样本数据,近似估计给定策略下的价值函数 vπv_{\pi}vπimport gymimport numpy as npfrom matplotlib import pyplotimport matplotlib.pyplot as pltfrom mpl_toolkits.mplot3d import Axes3Dfrom collections...
2019-04-02 19:55:27 2520
原创 【强化学习】策略迭代
import gymimport numpy as npenv = gym.make('FrozenLake-v0')env.render()def compute_value_function(policy, gamma=1.0): # initialize value table with zeros value_table = np.zeros(env.n...
2019-04-02 18:28:25 1543 2
原创 【强化学习】价值迭代
价值函数定义为带入 R 的定义:角标 π\piπ 说明,所有状态的价值依赖于 agent 采取的策略。这是显然的,如果agent 永远不动,那么所有状态的价值都是 0,假设环境不会自己变化。要求到最优的策略,先找最优的价值评估。借助于价值函数的贝尔曼方程:用迭代的方式求解出任意 策略π\piπ 对应的价值函数。最优的策略,就是每一步都选择价值最大的下一个状态,所以对应的价值函数为...
2019-04-02 00:08:10 2412
2024年3月杭州及周边小区挂牌价格
2024-03-22
利用 SIFT 实现图像拼接 python 代码
2021-01-01
python 使用摄像头监测心率
2020-10-14
知网爬虫.ipynb
2020-09-10
Python 图片中扭曲矩形的复原
2020-09-06
explore_data.ipynb
2020-05-20
Introduction to symmetry analysis (2002) [Brian J. Cantwell]
2020-01-07
Feedback Control in Systems Biology
2019-09-18
ICML 2019年 会议文章目录 (含论文下载链接)
2019-06-04
《应用非线性控制》【Slotine & Weiping Li 著】MIT经典教材
2019-01-05
Handbook of Matrices
2018-09-22
算法设计(英文文字版)by Jon_Kleinberg & Eva_Tardos
2018-09-19
icml 2018年 会议文章目录(含文章下载链接)
2018-09-17
link prediction in social networks: law of power distribution
2018-01-23
《Combinatorial Optimization》Cook, Cunningham, Pulleyblank, Schrijver
2017-11-14
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人