06 2020 档案

摘要:1. Emoji表情生成器 下面,我们要使用词向量(word vector)来构建一个表情生成器。 你将实现一个模型:输入一句话 (如 "Let's go see the baseball game tonight!") 然后找到使用在这句话上最合适的表情(⚾️). 使用单词向量来改进表情符号查找 阅读全文
posted @ 2020-06-30 22:44 douzujun 阅读(905) 评论(0) 推荐(0) 编辑
摘要:conda install --offline ./cudnn-7.0.5-cuda8.0_0.tar.bz2 阅读全文
posted @ 2020-06-30 18:22 douzujun 阅读(2632) 评论(0) 推荐(0) 编辑
摘要:1. 词向量上的操作(Operations on word vectors) 因为词嵌入的训练是非常耗资源的,所以ML从业者通常 都是 选择加载训练好 的 词嵌入(Embedding)数据集。(不用自己训练啦~~~) 任务: 导入 预训练词向量,使用余弦相似性(cosine similarity)计 阅读全文
posted @ 2020-06-29 23:13 douzujun 阅读(712) 评论(0) 推荐(0) 编辑
摘要:import codecs def read_glove_vecs(glove_file): with open(glove_file, 'r', encoding='utf-8') as f: # 修改这个 words = set() word_to_vec_map = {} for line i 阅读全文
posted @ 2020-06-29 22:46 douzujun 阅读(881) 评论(0) 推荐(0) 编辑
摘要:参考 1. Word Representation 之前介绍用词汇表表示单词,使用one-hot 向量表示词,缺点:它使每个词孤立起来,使得算法对相关词的泛化能力不强。 从上图可以看出相似的单词分布距离较近,从而也证明了Word Embeddings能有效表征单词的关键特征。 2. 词嵌入(word 阅读全文
posted @ 2020-06-28 12:30 douzujun 阅读(804) 评论(0) 推荐(1) 编辑
摘要:https://blog.csdn.net/Hydra_xyc/article/details/90554067 https://blog.csdn.net/qq_39506912/article/details/89680774 git config --global http.postBuffe 阅读全文
posted @ 2020-06-28 00:23 douzujun 阅读(172) 评论(0) 推荐(0) 编辑
摘要:理解:2个样本数据,每个数据3行(T_x = 3),4列(n_value = 4) indices = np.argmax(pred, 2) 例如,对第一个样本数据的,第一行中的,所有数据取最大值的索引下标 阅读全文
posted @ 2020-06-27 21:19 douzujun 阅读(325) 评论(0) 推荐(0) 编辑
摘要:conda config --remove-key channels 更灵活 conda config --set channel_priority flexible 阅读全文
posted @ 2020-06-27 14:14 douzujun 阅读(2386) 评论(0) 推荐(0) 编辑
摘要:Improvise a Jazz Solo with an LSTM Network 实现使用LSTM生成音乐的模型,你可以在结束时听你自己的音乐,接下来你将会学习到: 使用LSTM生成音乐 使用深度学习生成你自己的爵士乐 现在加载库,其中,music21可能不在你的环境内,你需要在命令行中执行pi 阅读全文
posted @ 2020-06-26 23:20 douzujun 阅读(980) 评论(0) 推荐(0) 编辑
摘要:np.random.seed(0) p = np.array([0.1, 0.0, 0.7, 0.2]) index = np.random.choice([0, 1, 2, 3], p = p.ravel()) 2 阅读全文
posted @ 2020-06-26 01:38 douzujun 阅读(452) 评论(0) 推荐(0) 编辑
摘要:Character level language model - Dinosaurus land 为了构建字符级语言模型来生成新的名称,你的模型将学习不同的名字,并随机生成新的名字。 任务清单: 如何存储文本数据,以便使用RNN进行处理。 如何合成数据,通过采样在每个time step预测,并通过下 阅读全文
posted @ 2020-06-26 00:23 douzujun 阅读(675) 评论(0) 推荐(0) 编辑
摘要:一步步搭建循环神经网络 将在numpy中实现一个循环神经网络 Recurrent Neural Networks (RNN) are very effective for Natural Language Processing and other sequence tasks because the 阅读全文
posted @ 2020-06-22 22:57 douzujun 阅读(1296) 评论(0) 推荐(0) 编辑
摘要:def getRandomIndex(n, x): # 索引范围为[0, n),随机选x个不重复,注意replace=False才是不重复,replace=True则有可能重复 index = np.random.choice(np.arange(n), size=x, replace=False) 阅读全文
posted @ 2020-06-22 22:14 douzujun 阅读(1960) 评论(0) 推荐(0) 编辑
摘要:参考1 参考2 参考3 1. 为什么选择序列模型 序列模型能够应用在许多领域,例如: 语音识别 音乐发生器 情感分类 DNA序列分析 机器翻译 视频动作识别 命名实体识别 这些序列模型都可以称作使用标签数据(X,Y)作为训练集的监督式学习,输入x和输出y不一定都是序列模型。如果都是序列模型的话,模型 阅读全文
posted @ 2020-06-19 11:53 douzujun 阅读(1022) 评论(0) 推荐(0) 编辑
摘要:1. Residual Networks(残差网络) 残差网络 就是为了解决深网络的难以训练的问题的。 In this assignment, you will: Implement the basic building blocks of ResNets. Put together these b 阅读全文
posted @ 2020-06-18 23:03 douzujun 阅读(647) 评论(0) 推荐(0) 编辑
摘要:本次我们将: 学习到一个高级的神经网络的框架,能够运行在包括TensorFlow和CNTK的几个较低级别的框架之上的框架。 看看如何在几个小时内建立一个深入的学习算法。 为什么我们要使用Keras框架呢?Keras是为了使深度学习工程师能够很快地建立和实验不同的模型的框架,正如TensorFlow是 阅读全文
posted @ 2020-06-18 17:00 douzujun 阅读(628) 评论(0) 推荐(0) 编辑
摘要:先查看,TensorFlow和你keras对应版本 https://docs.floydhub.com/guides/environments/ 为了完成作业,我的版本是: TensorFlow 1.2.0 + Keras 2.0.6 on Python 3.5. 安装: pip install k 阅读全文
posted @ 2020-06-18 14:30 douzujun 阅读(214) 评论(0) 推荐(0) 编辑
摘要:参考 1. Why look at case studies 介绍几个典型的CNN案例: LeNet-5 AlexNet VGG Residual Network(ResNet): 特点是可以构建很深的神经网络 Inception Neural Network 2. Classic Networks 阅读全文
posted @ 2020-06-17 19:24 douzujun 阅读(869) 评论(0) 推荐(0) 编辑
摘要:import re, requests, json, os, time from io import BytesIO headers = { "User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, l 阅读全文
posted @ 2020-06-16 22:06 douzujun 阅读(372) 评论(0) 推荐(0) 编辑
摘要:1. TensorFlow model import math import numpy as np import h5py import matplotlib.pyplot as plt import scipy from PIL import Image from scipy import nd 阅读全文
posted @ 2020-06-16 18:38 douzujun 阅读(961) 评论(0) 推荐(0) 编辑
摘要:Convolutional Neural Networks: Step by Step implement convolutional (CONV) and pooling (POOL) layers in numpy, including both forward propagation and 阅读全文
posted @ 2020-06-15 20:39 douzujun 阅读(1308) 评论(0) 推荐(0) 编辑
摘要:参考1 参考2 1. 计算机视觉 使用传统神经网络处理机器视觉的一个主要问题是输入层维度很大。例如一张64x64x3的图片,神经网络输入层的维度为12288。 如果图片尺寸较大,例如一张1000x1000x3的图片,神经网络输入层的维度将达到3百万,使得网络权重W非常庞大。 这样会造成两个后果: 一 阅读全文
posted @ 2020-06-14 17:06 douzujun 阅读(916) 评论(0) 推荐(0) 编辑
摘要:1. 爬虫代码 # -*- coding: utf-8 -*- """ Created on Sat Jun 13 20:15:03 2020 @author: Administrator """ import requests import json import chardet import r 阅读全文
posted @ 2020-06-13 23:13 douzujun 阅读(253) 评论(0) 推荐(0) 编辑
摘要:参考:https://blog.csdn.net/red_stone1/article/details/78600255https://blog.csdn.net/red_stone1/article/details/78600255 1. error analysis 举个例子,猫类识别问题,已经 阅读全文
posted @ 2020-06-13 22:42 douzujun 阅读(529) 评论(0) 推荐(0) 编辑
摘要:换源: 清华:https://pypi.tuna.tsinghua.edu.cn/simple/ 阿里云:http://mirrors.aliyun.com/pypi/simple/ 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/ 华中理工大学:htt 阅读全文
posted @ 2020-06-13 21:17 douzujun 阅读(184) 评论(0) 推荐(0) 编辑
摘要:参考:https://blog.csdn.net/red_stone1/article/details/78519599 1. 正交化(Orthogonalization) 机器学习中有许多参数、超参数需要调试。 通过每次只调试一个参数,保持其它参数不变而得到的模型某一性能改变是一种最常用的调参策略 阅读全文
posted @ 2020-06-13 15:54 douzujun 阅读(649) 评论(0) 推荐(0) 编辑
摘要:TensorFlow Tutorial Initialize variables Start your own session Train algorithms Implement a Neural Network 1. Exploring the Tensorflow Library To sta 阅读全文
posted @ 2020-06-12 19:23 douzujun 阅读(1246) 评论(0) 推荐(0) 编辑
摘要:摘抄:https://xienaoban.github.io/posts/2106.html 1. 调试(Tuning) 超参数 取值 #学习速率:α Momentum:β 0.9:相当于10个值中计算平均值;0.999相当于1000个值中计算平均值 Adam:\( 阅读全文
posted @ 2020-06-12 00:07 douzujun 阅读(768) 评论(0) 推荐(0) 编辑
摘要:···python plt.title("Model with Adam optimization") axes = plt.gca() axes.set_xlim([-1.5,2.5]) axes.set_ylim([-1,1.5]) plot_decision_boundary(lambda x 阅读全文
posted @ 2020-06-11 21:17 douzujun 阅读(1386) 评论(0) 推荐(0) 编辑
摘要:1. Optimization Methods Gradient descent goes "downhill" on a cost function J. Think of it as trying to do this: **Figure 1** : **Minimizing the c 阅读全文
posted @ 2020-06-11 12:01 douzujun 阅读(694) 评论(0) 推荐(0) 编辑
摘要:笔记:Andrew Ng's Deeping Learning视频 摘抄:https://xienaoban.github.io/posts/58457.html 本章介绍了优化算法,让神经网络运行的更快 1. 梯度优化算法 1.1 Mini-batch 梯度下降 将 \(X = [x^{(1)}, 阅读全文
posted @ 2020-06-10 14:26 douzujun 阅读(872) 评论(0) 推荐(0) 编辑
摘要:1. Gradient Checking 你被要求搭建一个Deep Learning model来检测欺诈,每当有人付款,你想知道是否该支付可能是欺诈,例如该用户的账户可能已经被黑客掉。 但是,反向传播实现起来非常有挑战,并且有时有一些bug,因为这是一个mission-critical应用,你公司 阅读全文
posted @ 2020-06-10 12:22 douzujun 阅读(725) 评论(0) 推荐(0) 编辑
摘要:参考:https://www.cnblogs.com/devilmaycry812839668/p/9352814.html import numpy as np x=np.array([[0, 3, 4], [2, 6, 4]]) y=np.linalg.norm(x, axis=1, keepd 阅读全文
posted @ 2020-06-10 10:21 douzujun 阅读(1047) 评论(0) 推荐(0) 编辑
摘要:查看属性 .ndim :维度 .shape :各维度的尺度 (2,5) .size :元素的个数 10 .dtype :元素的类型 dtype(‘int32’) ndarray数组的创建 np.arange(n) ; 元素从0到n-1的ndarray类型 np.ones(shape): 生成全1 n 阅读全文
posted @ 2020-06-09 22:47 douzujun 阅读(594) 评论(0) 推荐(0) 编辑
摘要:Regularization Deep Learning models have so much flexibility and capacity that overfitting can be a serious problem,if the training dataset is not big 阅读全文
posted @ 2020-06-09 17:55 douzujun 阅读(912) 评论(0) 推荐(0) 编辑
摘要:最后一行改成这个: plot_decision_boundary(lambda x: predict_dec(parameters, x.T), train_X, np.squeeze(train_Y)) 或者 plt.scatter(X[0, :], X[1, :], c=np.squeeze(y 阅读全文
posted @ 2020-06-09 15:45 douzujun 阅读(268) 评论(0) 推荐(0) 编辑
摘要:Initialization 如何选择初始化方式,不同的初始化会导致不同的结果 好的初始化方式: 加速梯度下降的收敛(Speed up the convergence of gradient descent) 增加梯度下降 收敛成 一个低错误训练(和 普遍化)的几率(Increase the odd 阅读全文
posted @ 2020-06-09 14:36 douzujun 阅读(945) 评论(0) 推荐(0) 编辑
摘要:笔记:Andrew Ng's Deeping Learning视频 参考:https://xienaoban.github.io/posts/41302.html 参考:https://blog.csdn.net/u012328159/article/details/80210363 1. 训练集、 阅读全文
posted @ 2020-06-08 13:59 douzujun 阅读(1091) 评论(0) 推荐(0) 编辑
摘要:找到改文件夹,重命名文件夹zh_CN,改成 zh_CN_old 阅读全文
posted @ 2020-06-08 12:44 douzujun 阅读(817) 评论(0) 推荐(1) 编辑
摘要:新版的jupyter可能会自动汉化 如果你当前文件夹,不是按照写代码时候,标识符的命名规范,就会导致保存失败 可以把文件夹名字改成纯英语的,无特殊符号 自动保存可以成功 搞错了,妈的,文件路径太长,导致不能创建 .ipynb_checkpoints里的保存文件。。。神经病啊!!把文件路径搞短就可以了 阅读全文
posted @ 2020-06-08 12:33 douzujun 阅读(3924) 评论(0) 推荐(1) 编辑
摘要:%load_ext autoreload:在执行用户代码前,重新装入 软件的扩展和模块。 autoreload 意思是自动重新装入。 它后面可带参数。参数意思你要查你自己的版本帮助文件。一般说: 无参:装入所有模块。 0:不执行 装入命令。 1: 只装入所有 %aimport 要装模块 2:装入所有 阅读全文
posted @ 2020-06-08 09:04 douzujun 阅读(3595) 评论(0) 推荐(1) 编辑
摘要:公式推导 https://www.cnblogs.com/douzujun/p/13046923.html https://xienaoban.github.io/posts/12524.html 代码拆分实现 https://www.cnblogs.com/douzujun/p/10325980. 阅读全文
posted @ 2020-06-07 19:48 douzujun 阅读(231) 评论(0) 推荐(0) 编辑
摘要:创建虚拟环境, 创建 python=3.5的 (如果想安装tf2.1,这里就改成 3.7) https://www.cnblogs.com/douzujun/p/13059186.html 在虚拟环境里安装TensorFlow,单纯的完成ng作业,无cpu版本,使用conda,清华镜像 https: 阅读全文
posted @ 2020-06-07 11:13 douzujun 阅读(711) 评论(0) 推荐(0) 编辑
摘要:cmd中输入命令建立虚拟环境: conda create --name my_env python=3.7 激活环境: # windows进入虚拟环境my_env activate my_env # Linux 进入虚拟环境 source activate my_env 退出当前虚拟环境 deact 阅读全文
posted @ 2020-06-07 09:30 douzujun 阅读(1335) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/yuanzhoulvpi/article/details/86742729 https://blog.csdn.net/qq_34342852/article/details/97673819 离线安装 用conda安装会比较方便,下面直接用conda安装 阅读全文
posted @ 2020-06-06 18:18 douzujun 阅读(606) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/u012328159/article/details/80081962 https://mp.weixin.qq.com/s?__biz=MzUxMDg4ODg0OQ==&mid=2247484013&idx=1&sn=2f1ec616d9521b801e 阅读全文
posted @ 2020-06-04 22:28 douzujun 阅读(1832) 评论(0) 推荐(0) 编辑
摘要:Deep Learning 用逻辑回归训练图片的典型步骤. 笔记摘自:https://xienaoban.github.io/posts/59595.html 1. 处理数据 1.1 向量化(Vectorization) 将每张图片的高和宽和RGB展为向量,最终X的shape为 (height*wi 阅读全文
posted @ 2020-06-03 11:48 douzujun 阅读(1493) 评论(0) 推荐(0) 编辑
摘要:精准率:预测有100个人有癌症,在这些预测中,有多少是准确的。 precision=TPTP+FP 需要的是精确度 召回率:实际上100人有癌症,我们的预测算法能从中正确的挑出多少。 \(recall = \frac{TP}{P} = \frac{TP}{TP + 阅读全文
posted @ 2020-06-02 23:03 douzujun 阅读(323) 评论(0) 推荐(0) 编辑
摘要:本篇博客总结了,可能会重复使用的代码的索引,方便查找 分类性能度量 P-R曲线绘制 #利用鸢尾花数据集绘制P-R曲线 print(__doc__) #打印注释 import matplotlib.pyplot as plt import numpy as np from sklearn import 阅读全文
posted @ 2020-06-02 17:48 douzujun 阅读(318) 评论(0) 推荐(0) 编辑
摘要:https://files.cnblogs.com/files/douzujun/stopwords.zip 直接手动下载 stopwords.zip 放到 然后,再执行之前的操作,就可以了 阅读全文
posted @ 2020-06-02 17:04 douzujun 阅读(5554) 评论(0) 推荐(1) 编辑

点击右上角即可分享
微信分享提示