rasa结合kashgari训练数据时,out of memory错误
这两天新搬办公室,网络不好用,将就了。
博客园也上不了,github也上不了了,
工作效率降低不少。
今天遇到同事使用rasa用机器人项目的问题,
一个4核的Tesla K80 GPU,
性能照说不差,但一运行rasa train,或是rasa run,或是rasa shell,
指不定什么时候就报如下错误:
2019-11-06 07:08:28 WARNING root - Sequence length will auto set at 95% of sequence length 2019-11-06 07:08:37.627154: F tensorflow/stream_executor/cuda/cuda_driver.cc:175] Check failed: err == cudaSuccess || err == cudaErrorInvalidValue Unexpected CUDA error: out of memory
后来,使用nvidia-smi命令查看,原来还是一个经典问题,就是很多项目如果都在用同一个GPU核的话,
那很容易报内存错误。
于是,更改了kashgari库使用GPU的配置,搞定问题。
如下配置,是把kashgari运行的tf运行GPU不使用默认的,而使用指定的第4个GPU。
site-packages/kashgari/__init__.py
# encoding: utf-8 """ @author: BrikerMan @contact: eliyar917@gmail.com @blog: https://eliyar.biz @version: 1.0 @license: Apache Licence @file: __init__.py @time: 2019-05-17 11:15 """ import os os.environ['TF_KERAS'] = '1' os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' **os.environ['CUDA_VISIBLE_DEVICES']="3"** import tensorflow as tf tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR) import keras_bert from kashgari.macros import TaskType, config custom_objects = keras_bert.get_custom_objects() CLASSIFICATION = TaskType.CLASSIFICATION LABELING = TaskType.LABELING from kashgari.version import __version__ from kashgari import layers from kashgari import corpus from kashgari import embeddings from kashgari import macros from kashgari import processors from kashgari import tasks from kashgari import utils from kashgari import callbacks from kashgari import migeration migeration.show_migration_guide()
rasa结合kashgari训练数据时,out of memory错误的更多相关文章
- 使用Sqoop从mysql向hdfs或者hive导入数据时出现的一些错误
1.原表没有设置主键,出现错误提示: ERROR tool.ImportTool: Error during import: No primary key could be found for tab ...
- sklearn 调用逻辑回归函数训练数据时出现 “unknown label type:unknown”
problemsolution:
- DataGridView控件添加数据时空白的可 错误情况
写一个小程序,将数据库中的两张表相关信息显示在DataGridView中.代码如下: //获取项目数据,添加到表中 SqlConnection con = new SqlConnection(Main ...
- 关于oracle 11g导出数据时 报 ORA 1455错误的处理
因为导出的该用户的表可能存在空数据表,那么可能就会出现此其异常. 首先: 查看: SQL>show parameter deferred_segment_creation; 假设为T ...
- 使用java(jdbc)向mysql中添加数据时出现“unknown column……”错误
错误情况如题,出现这个错误的原因是这样的: 在数据库中,插入一个字符串数据的时候是需要用单引号引起来的. 而下面的代码,注意看: sta.executeUpdate("INSERT INTO ...
- pycharm连接mysql数据库插入中文数据时出现1366编码错误
创建数据库的时候应该这样创建: create database xxxxxxx DEFAULT CHARSET utf8 COLLATE utf8_general_ci:
- darknet训练yolov3时的一些注意事项
训练需要用到的文件: 1) .data文件.该文件包含一些配置信息,具体为训练的总类别数,训练数据和验证数据的路径,类别名称,模型存放路径等. 例如coco.data classes= 8 ...
- MSSQL导入数据时,出现“无法截断表 因为表正由Foreign key引用”错误
* 错误 0xc002f210: 准备 SQL 任务: 执行查询“TRUNCATE TABLE [dsc100552_db].[dbo].[ALV_SalesBigClass] ”失败,错误如下:“无 ...
- mysql插入数据时 insert IGNORE、ON DUPLICATE KEY UPDATE、replace into
转: mysql insert时几个操作DELAYED .IGNORE.ON DUPLICATE KEY UPDATE的区别 博客分类: mysql基础应用 mysql insert时几个操作DE ...
随机推荐
- Java基础语法02-流程控制-if-switch-for-while
流程控制语句 顺序结构 任何编程语言中最常见的程序结构就是顺序结构.顺序结构就是程序从上到下逐行地执行,中间没有任何判断和跳转. 分支结构 if(条件表达式){ 语句体;} 执行流程 首先判断条件表达 ...
- Additional information: The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding elemen
wcf service: <system.serviceModel> <bindings> <basicHttpBinding> <binding name= ...
- day 27-1 反射、内置方法
反射 反射:通过字符串来映射到对象的属性 class People(): def __init__(self, name, age): self.name = name self.age = age ...
- You don't have permission to access / on this server,Forbidden
wampserver配置虚拟主机Forbidden,apache You don't have permission to access 找到httpd.conf文件(通常在安装apache的conf ...
- 如何使ElementUi中的el-dropdown传入多参数
这边因为业务的需求,觉得随着产品中心以后需要按钮的增多(图1操作栏的效果),这样会导致排版和按钮过于冗长的问题,用户体验不佳,于是想到利用el-dropdown做一个下拉按钮(图1操作1栏的效果) . ...
- java根据value获取Map对象的key
Map<String, String> map= new HashMap<String,String>(); for(Map.Entry<String, String&g ...
- springboot+quartz+数据库存储
Spring整合Quartz a.quartz调度框架是有内置表的 进入quartz的官网http://www.quartz-scheduler.org/,点击Downloads, 下载后在目录\do ...
- Mysql安装及常用命令
部分内容转载于 https://www.linuxidc.com/Linux/2016-09/135288.htm https://www.cnblogs.com/rays-/p/8081798.ht ...
- 一篇和Redis有关的锁和事务的文章
部分参考链接 Transaction StackExchange.Redis Transaction hashest 正文 Redis 是一种基于内存的单线程数据库.意味着所有的命令是一个接一个的执行 ...
- [译]Vulkan教程(24)索引buffer
[译]Vulkan教程(24)索引buffer Index buffer 索引buffer Introduction 入门 The 3D meshes you'll be rendering in a ...