自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 资源 (1)
  • 收藏
  • 关注

原创 pytorch使用cuda报错RuntimeError: CUDA error: unknown error

pytorch使用cuda报错RuntimeError: CUDA error: unknown error加上torch.cuda.current_device()例如import osimport torchimport torch.nn as nnimport argparsefrom sklearn import metricsfrom torch.utils....

2019-12-17 19:40:13 4277 1

原创 将一个文件夹下面的所有text合并到一个CSV中

def read_txt(path,i): file = open(path,"rb") text = [] str = '' for line in file: line = line.decode().lower() str = str + line text.append(str) text.append...

2019-05-06 08:13:17 556

原创 将TXT转换成CSV

import reimport pandas as pdfile = open("C:/Users/zZ/Desktop/evsam2/evaltask2_sample_data/en_sample_data/sample.positive_short.txt","r")texts = []for line in file: text = [] index = line.f...

2019-05-05 20:46:41 5221

原创 ValueError: [E030] Sentence boundaries unset. You can add the 'sentencizer' component to the pipelin

错误代码:nlp = English()nlp.add_pipe(nlp.create_pipe('sentencizer'))def normalize(text): text = text.lower().strip() doc = nlp(text) filtered_sentences = [] for sentence in tqdm(doc.s...

2019-04-11 10:05:40 1629 1

原创 keras 多输入单输出 出现的问题ValueError: Error when checking model input: the list of Numpy arrays that you are

新手上路,文本分类中,我将一个文本用不同的嵌入得到不同的表示,代码如下#第一种嵌入sentence_input_pos = Input(shape=(MAX_TEXT_LENGTH,), dtype='int32')embedded_sequences_pos = embedding_layer_pos(sentence_input_pos)l_lstm_pos = Bidirec...

2019-03-21 14:38:16 16319 2

原创 TypeError: Value passed to parameter 'shape' has DataType float32 not in list of allowed values: int

Problem    embed2 = TimeDistributed(Encoder1)(input2)  File "E:\Python\Python36\lib\site-packages\keras\engine\topology.py", line 603, in __call__    output = self.call(inputs, **kwargs)  File "E...

2018-11-13 09:10:09 8115 8

转载 Python类中的self

https://www.cnblogs.com/chownjy/p/8663024.htmlPython编写类的时候,每个函数参数第一个参数都是self,一开始我不管它到底是干嘛的,只知道必须要写上。后来对Python渐渐熟悉了一点,再回头看self的概念,似乎有点弄明白了。首先明确的是self只有在类的方法中才会有,独立的函数或方法是不必带有self的。self在定义类的方法时是必须有的...

2018-10-02 18:37:11 204

原创 Please use the NLTK Downloader to obtain the resource:

解决如下:原因在于缺少一个模块window 下 >>>python>>> import nltk>>> nltk.download('punkt')

2018-09-28 21:02:14 5335 5

转载 can't use a string pattern on a bytes-like object

Python 出现 can't use a string pattern on a bytes-like object# coding=utf-8 import urllib.request import re url = 'http://www.163.com' file = 'd:/test.html' data = urllib.request.urlopen(url).rea...

2018-09-28 20:54:44 315

原创 ImportError: cannot import name 'initializations'

In Keras 2.0, initializations was renamed (mirror) as initializers. You should therefore instead writefrom keras import initializers

2018-09-18 23:47:29 5304

原创 ImportError: cannot import name 'Merge'

ImportError: cannot import name 'Merge' 原因:Keras2.2版本貌似没有Merge这个东西解决:pip3 install --upgrade keras==2.1.0 升级到指定版本 2.1就有Merge

2018-09-18 23:44:59 7359

转载 TensorFlow图变量tf.Variable的用法解析

转自https://blog.csdn.net/gg_18826075157/article/details/78368924  两种定义图变量的方法1.tf.Variable2.tf.get_variable scope如何划分命名空间1. tf.variable_scope2. tf.name_scope...

2018-09-14 23:09:00 258

原创 零基础入门深度学习

讲的很好,通俗易懂https://zybuluo.com/hanbingtao/note/581764

2018-08-30 09:51:11 171

转载 SVM

机器之心已认证的官方帐号368 人赞同了该回答当处理文本分类问题时,你需要不断提炼自己的数据集,甚至会尝试使用朴素贝叶斯。在对数据集满意后,如何更进一步呢?是时候了解支持向量机(SVM)了:一种快速可靠的分类算法,可以在数据量有限的情况下很好地完成任务。在本文中,Bruno Stecanella 将对这一概念进行通俗易懂的解释,希望能对你有所帮助。或许你已经开始了自己的探索,听说过线性可分、核心技...

2018-07-09 10:42:40 971

转载 windows10 64位系统,Python3.6环境下安装TensorFlow时报错,错误如下:

问题描述:windows10 64位系统,Python3.6环境下安装TensorFlow时报错,错误如下:..........  File "F:\软件\python3.6.1\lib\site-packages\pip\compat\__init__.py", line 75,in console_to_str    return s.decode('utf_8')UnicodeDecodeE...

2018-07-07 17:43:22 866

转载 Word2vec

作者:穆文链接:https://zhuanlan.zhihu.com/p/26306795来源:知乎著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。1. 引子大家好我叫数据挖掘机皇家布鲁斯特大学肄业我喝最烈的果粒橙,钻最深的牛角尖——执着如我今天我要揭开Word2vec的神秘面纱直窥其本质相信我,这绝对是你看到的最浅白易懂的 Word2vec 中文总结(蛤?你问我为啥有这个底气...

2018-07-05 15:01:16 450

原创 决策树

决策树是种树形结构 过程包括属性选择度量、决策树的生成和剪枝cd3和c4.5 是基于信息论的  CART是基于基尼指数的  

2018-03-27 10:14:17 197

原创 VS

我的情况是这样的: 重装系统后安装VS2010  让后导入一个程序 运行就出现这个问题解决方案如下:1、单击红色部分 即 项目的属性2、点击 生成 出现下图3、选择 .net F    4就好了

2016-04-03 00:27:39 193

Python数据挖掘入门与实践

本书作为数据挖掘入门读物,介绍了数据挖掘的基础知识、基本工具和实践方法,通过循序渐进地讲解算法,带你轻松踏上数据挖掘之旅。本书采用理论与实践相结合的方式,呈现了如何使用决策树和随机森林算法预测美国职业篮球联赛比赛结果,如何使用亲和性分析方法推荐电影,如何使用朴素贝叶斯算法进行社会媒体挖掘,等等。本书也涉及神经网络、深度学习、大数据处理等内容。

2017-10-29

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除