- 博客(25)
- 资源 (2)
- 收藏
- 关注
原创 Unknown initializer: GlorotUniform的解决方法
import kerasfrom keras.models import load_modelfrom keras.utils import CustomObjectScopefrom keras.initializers import glorot_uniformwith CustomObjectScope({'GlorotUniform': glorot_uniform()}): model = load_model('imdb_mlp_model.h5')
2020-08-16 08:42:14
2298
2
原创 安装transform3d
1.conda安装conda install -c owlas transforms3d2.pip安装pip install transformers -i https://pypi.tuna.tsinghua.edu.cn/simple
2020-08-10 15:11:27
4971
原创 读取tensorboard数据
from tensorboard.backend.event_processing import event_accumulatorea = event_accumulator.EventAccumulator(日志地址)ea.Reload()print(ea.scalars.Keys())val_psnr = ea.scalars.Items(‘accuracy’)print(len(val_psnr))print([(i.step, i.value) for i in val_psnr])
2020-07-24 09:44:40
648
原创 ubuntu安装deep-wine下载qq,tim等文件
安装deep-wine环境https://github.com/wszqkzqk/deepin-wine-ubuntu打开解压后的deep-wine文件夹sudo sh ./install.sh即完成deep-wine环境安装QQTIM微信Foxmail安装相应deb文件sudo dpjk -i xxxxx.deb即完成安装
2020-07-20 07:23:23
631
原创 ubuntu清空回收站命令
图像界面回收站清空数量庞大文件可能会导致ubuntu死机,用命令清空回收站即可瞬间完成sudo rm -rf ~/.local/share/Trash/*
2020-07-17 10:54:40
5535
原创 ubuntu连接服务器上传文件
ubuntu连接服务器上传文件得到服务器ip账号后在终端输入ssh -p 服务器端口号 root@服务器地址即可连接上服务器开启本地终端scp -P 服务器端口号 目标文件 root@服务器地址:目标文件即可完成调用文件若是文件夹即在端口号后加上 -r注意区分本地终端和服务器终端另:让程序在后台运行nohup ./运行文件 >train.log &将结果保存在train.log...
2020-07-10 12:49:52
385
原创 matplotlib的细节操作
1.设置坐标轴刻度向内:plt.rcParams[‘xtick.direction’] = ‘in’plt.rcParams[‘ytick.direction’] = ‘in’2.设置图中"label"的透明度:在legend结束后加上get_frame().set_alpha(alpha)alpha越小越透明3.画直线:plt.axvline(x,ls,c)x为x轴坐标ls为...
2020-04-02 19:54:57
431
原创 could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR的解决方案
这种问题是调用GPU出现问题,目前我发现的有两种解决方案:一.调用代码在session前加上os.environ[“CUDA_VISIBLE_DEVICES”] = “PCI_BUS_ID”os.environ[“CUDA_VISIBLE_DEVICES”] = ‘0’ #use GPU with ID=0config = tf.ConfigProto()config.gpu_opti...
2020-03-16 21:05:30
228
原创 更改ubuntu应用的图标
cd /usr/share/applicationstouch 文件名gedit 文件名以pycharm为例[Desktop Entry]Type=ApplicationName=PycharmGenericName=Pycharm3Comment=Pycharm3:The Python IDEExec="/home/rufus/pycharm-community-2019.2....
2020-02-29 20:22:31
540
原创 Process finished with exit code 134 (interrupted by signal 6: SIGABRT)的解决方法,ubuntu16.04
产生这个错误的原因网上千奇百怪,后来我发现我是因为没有给pycharm分配gpu空间在代码前面加上这个分配gpu内存的命名一般就可以解决os.environ[“CUDA_VISIBLE_DEVICES”] = “PCI_BUS_ID”os.environ[“CUDA_VISIBLE_DEVICES”] = ‘0’config = tf.ConfigProto()config.gpu_op...
2020-02-23 20:18:24
4012
1
原创 python操作文本和图片
替换每行的文本内容f = open(文件名, ‘r+’)a = f.readlines()f = open(文件名,‘w’)for i in a:f.write(i.replace(选中内容,替换内容))f.close()切割文本内容,精确到按行切割:a = linecache.getlines(文件名)[起始行:结束行] (左开右闭)linecache模块好用到不行有时候...
2020-02-23 15:21:20
188
原创 OutOfRangeError: FIFOQueue '_1_batch/fifo_queue' is closed and has insufficient elements 的解决办法
在制作tfrecords过程中出现了这个错误,在网上找了很多解答,目前主流解答方法有三种:1.加入初始化全局变量2.改tf.train.batch 和tf.train.shuffle_batch,里面的num_enpoch,capacity参数不用变3.数据集的错误但是这些方法均不适用于我的程序,我花了两周时间检查,我的解决方法应该适用所有类型的tfrecords格式,tfrecord...
2020-02-22 18:51:22
1037
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人