实验记录
文章平均质量分 53
W_Ria
学习ing
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
调用百度翻译API,返回空值的情况
意识到是关于所翻译内容的大小问题,还是调了好久。 查阅get方式的请求会限制1024字节,而改成post方式发送请求就可以了。 post方式如下: import hashlib import json import random import requests url="http://api.fanyi.baidu.com/api/trans/vip/translate" appid ...原创 2019-07-25 14:03:27 · 2392 阅读 · 2 评论 -
Input 'end' of 'StridedSlice' Op has type float64 thatt does not match type int32 of argument'begin'
将py2的代码转换到py3 之后程序遇到这个问题 经查找: 此步中, self.batch_size : half: 查阅可知:python2与python3的除法机制存在差异。 则对于这里需要处理。 ___________________________________________________________________________________ ...原创 2019-07-22 11:07:06 · 768 阅读 · 0 评论 -
python matploblib plot画图报错
当数据量很大的时候,使用matplotlib.pylab画图,有时会报如下错误: OverflowError: In draw_path: Exceeded cell block limit 解决方案是加入如下代码,或者设置比10000更大的值 import matplotlib as mpl mpl.rcParams['agg.path.chunksize'] = 10000 -----...转载 2019-05-12 09:39:21 · 3363 阅读 · 0 评论 -
2020-12-16 python调试笔记
1. dict相关 ''' for test to print the value... ''' data={'1.wav':[[ 1.9010893 , 1.8951541 , 0.7492561 , 1.1373364 , 2.1521096 , 4.452796 ], [ 1.5981388 , 1.5932648 , 1.4989793 , 0.3432958 , 0.92565787, 2.1640224 ], [ 1....原创 2021-03-30 12:48:37 · 175 阅读 · 0 评论 -
2021-03-12/15/18实验记录
1. importlib.import_module() 动态导入对象,动态导入模块, 导入当前包下的preprocessor_name(vctk.py)模块.Preprocessor 2. functools.partial() https://www.cnblogs.com/wxys/p/13756552.html 3. pool.imap 是Python的进程池的一种调用方法 多进程模式最大的优点就是稳定性高,因为每个进程独立拥有自己的调度资源,一个Worker的崩.原创 2021-03-18 16:10:53 · 265 阅读 · 0 评论 -
2021-03-10/11实验记录
1. TypeError: cat() got an unexpected keyword argument 'axis' 提高pytorch的版本至1.2.0以上 2. RuntimeError: Input type (torch.cuda.DoubleTensor) and weight type (torch.cuda.FloatTensor) should be the same 1)CUDA和CPU,输入数据x和模型中的权重值类型不一样,一般来说是因为模型的参数不在GPU中,而原创 2021-03-12 17:20:53 · 238 阅读 · 0 评论 -
2021-03-08操作记录
1. OMP: Warning #190: Forking a process while a parallel region is active is potentially unsafe. 可能问题:同时使用多个dataloader时,有时候会出现这个警告,同时cpu占用率飙升。 解决方案:将DataLoader初始化参数中的pin_memory设为False,问题解决。参考链接 原文链接:https://blog.youkuaiyun.com/zhjadsf/article/details/82983083原创 2021-03-10 09:26:58 · 2966 阅读 · 0 评论
分享