
tensorflow
文章平均质量分 85
gdengden
这个作者很懒,什么都没留下…
展开
-
Ubuntu18.04双系统安装+GPU+CUDA10+CUDNN7+ANACONDA3+PYTHON+PYCHARM
Ubuntu18.04双系统安装+GPU+CUDA10+CUDNN7+ANACONDA3+PYTHON+PYCHARM一、Win10 环境下安装Ubuntu 18.04过程记录步骤1:下载镜像文件从Ubuntu官网https://www.ubuntu.com/download/server下载系统的iso镜像文件 ,下载后不用解压,过程如下:步骤2:格式化U盘格式化你的U盘,格式化的时候选择FAT32格式的,具体过程如下: 步骤3:制作启动盘从网上https:...原创 2020-05-19 19:32:00 · 4376 阅读 · 0 评论 -
tensorflow 获取模型所有参数总和数量
参数数量:np.sum([np.prod(v.get_shape().as_list()) for v in tf.trainable_variables()])浮点运算量:tf.contrib.tfprof.model_analyzer.print_model_analysis(tf.get_default_graph(), tfprof_options=tf.contrib.tfp...原创 2020-04-15 18:43:04 · 4762 阅读 · 0 评论 -
semi-supervised models
1、生成模型算法(Generate semi-supervised models)思想如下:假设一个模型,其分布满足:p(x ,y)=p(y) p(x | y)。其中,p(x | y)是已知的条件概率分布。那么大量未经标记数据的联合分布就可以被确定。生成模型算法的流程图如下。半监督学习方法可以对同时含有已标记的和未标记的数据集进行聚类,然后通过聚类结果中,每一类中所含有的任何一个已标记数据实例...转载 2019-04-01 22:21:54 · 1654 阅读 · 0 评论 -
SSGF-for-HRRS-scene-classification-master程序执行中caffe相关内容配置
/home/sys1710/anaconda3/envs/python27/bin/python2.7 /home/sys1710/PycharmProjects/guo/SSGF-for-HRRS-scene-classification-master/1selftraining.pyWARNING: Logging before InitGoogleLogging() is written ...原创 2019-03-23 16:56:07 · 331 阅读 · 1 评论 -
python3使用pickle读取文件提示TypeError或者UnicodeDecodeError的解决办法
一、分割数据成train和test 代码:# data segmentation code # resize origin code to match classifier model and split the data set into training and test setimport sysimport osimport shutilimport csvimpo...原创 2019-03-25 16:46:44 · 2378 阅读 · 2 评论 -
tensorlayer和tensorflow版本对应问题
tensorlayer需要和对应的tensorfolw版本一致 比如 tensorflow-gpu1.4.1 tensorlayer 1.4.1如果是 tensorflow不带gpu的,注意版本 pip install --upgrade tensorflow==1.5.0 tensorlayer 1.5.0pip install --upgrade tensor...原创 2019-03-17 16:06:24 · 10992 阅读 · 0 评论 -
GAN-based-HRRS-Sample-Generation-for-Image-Classification执行
The GAN-based method is used to generate high-resolution remote sensing for data augmentation and image classification.https://github.com/weihancug/GAN-based-HRRS-Sample-Generation-for-Image-Classif...原创 2019-03-12 16:00:06 · 732 阅读 · 2 评论 -
使用Anaconda安装caffe
pycharm中 ImportError: No module named caffe首先,需要看下在命令行能不能import caffe先CTRL+ALT+T打开终端python %打开pythonimport caffe %测试caffe在终端中能不能用如果还是出现No module named caffe输入一下命令就可以了...原创 2019-03-10 21:32:01 · 6472 阅读 · 1 评论 -
Caffe研究实践 ---环境搭建
首先说一下pycharm下使用caffe的问题,并且是anaconda下配置的caffe cpu版本pycharm中 ImportError: No module named caffe首先,需要看下在命令行能不能import caffe先CTRL+ALT+T打开终端python %打开pythonimport caffe %测试...原创 2019-03-09 23:33:38 · 962 阅读 · 0 评论 -
Spectral-Spatial Residual Network for Hyperspectral Image Classification--SSRN代码执行问题
论文:Spectral-Spatial Residual Network for Hyperspectral Image Classification: A 3-D Deep Learning Framework代码 SSRN。路径首先修改然后 写入path2对应的文件内容时候出错。后来修改了modelstatsrecord.py中三个函数中的代码,如黑体显示的部分,改为斜体显示的内容...原创 2019-03-13 21:29:46 · 2240 阅读 · 8 评论 -
使用Pytorch的常见错误汇总 gan-based-HRRS-Sample-Generation-for-image-classification-master代码中的问题
ucm数据集中图像大小不全是256*256的 ,有253*256的导致处理时候遇到问题。如何解决呢?现在 d盘 下 可运行tensorflow下train文件夹下的图像全部是256*256.那些年我们一起踩过的坑!文章目录那些年我们一起踩过的坑!Error标签范围问题输入图像大小不一的问题内存连续问题保存和加载整个模型的问题argument or attribute err...原创 2019-03-13 21:00:54 · 1103 阅读 · 2 评论 -
python2 python3 TypeError: unsupported operand type(s) for /: 'dict_values' and 'int'
plot绘制各种曲线的程序,在python27下运行正常,到python35下 提示出现这个错误:TypeError: unsupported operand type(s) for /: 'dict_values' and 'int' In python3,dict.valuesreturns adict_valuesobject, which is not alist...原创 2019-03-30 16:37:03 · 5975 阅读 · 0 评论 -
Tensorflow学习:ResNet代码(详细剖析)
https://blog.youkuaiyun.com/superman_xxx/article/details/65452735https://blog.youkuaiyun.com/qq_29893385/article/details/81207203https://blog.youkuaiyun.com/zzc15806/article/details/83540661https://blog.youkuaiyun.com/...转载 2019-03-24 13:19:07 · 4243 阅读 · 1 评论 -
resnet tensorflow 代码分析
https://github.com/chaipangpang/ResNet_cifar参考下面有详细代码分析:main.py# Copyright 2016 The TensorFlow Authors. All Rights Reserved.## Licensed under the Apache License, Version 2.0 (the "License");#...转载 2019-03-24 13:20:40 · 1298 阅读 · 0 评论 -
在Ubuntu下如何压缩一个文件夹,如何查看文件夹大小
sudo tar zcvf work.tar.gz work/sudo tar jcvf work.tar.bz2 work/sudo tar cvf work.tar work记住了,要加sudo顺便也写一下解压缩吧tar xzvf work.tar.gztar xjvf work.tar.bz2tar xvf work.tar查看当前目录使用的总空间大小...原创 2019-04-28 20:31:28 · 2304 阅读 · 0 评论 -
Ubuntu16.04 RTX2080ti 安装NVIDIA驱动+cuda9.0+cudnn7.3.0
工程师说rtx2080ti支支持cuda10,开始用cuda最新版10.1折腾了两天,都成功了,但是运行tensorflow时候提示要cuda9版本。最后实验了一下cuda9 cudnn7.3.1终于成功跑起来了, 记得用conda install tensorflow-gpu=1.8.0 或者1.7.0 安装 太低版本好像还是出问题。另外,今天一早运行任务估计并行太大,导致系统死机,重新启动...原创 2019-04-19 15:08:52 · 12235 阅读 · 10 评论 -
cifar数据集替换成eurosat数据集代码,并绘制相关曲线--tirpleGAN-Tensorflow 笔记本电脑上
一、cifar.py代码修改import randomimport numpy as npfrom collections import defaultdictfrom keras.datasets import cifar10import svhn_data #新添加的,引入euro对应的mat格式文件的代码。class_num = 10image_size = 32img_...原创 2019-04-13 20:55:13 · 754 阅读 · 0 评论 -
Ubuntu后台运行、查看、 终止python
ps -ef1656 ps -aux|grep train_wvh64.py1657 kill -9 108711658 ps -aux|grep train_wvh64.py运行nohup python -u R.py > out.log 2>&1 &查看 ps -ef ps -aux|grep chat....原创 2019-04-21 12:50:59 · 4846 阅读 · 0 评论 -
tensorflow/stream_executor/cuda/cuda_dnn.cc:378] Loaded runtime CuDNN library: 7301--2019.5.12
安装的cudnn的版本是7.1.0.3,而要求的cudnn版本是7.3.0.0。将tensorflow版本从1.5换成1.8,顺利运行程序(升级tensorflow版本来解决)ll 命令查看 连接 /usr/local/cuda/lib64下 把对应的 libcudnn.so.7,3,1连到 libcudnn.so.7 在连到libcudnn.sosudo ln -sf li...原创 2019-01-31 02:21:51 · 8412 阅读 · 1 评论 -
tensorlayer安装
对应有tensorflow才行。pip install tensorflow-gpu # GPU 版本 (二选一)pip install tensorlayer # 之后安装 TensorLayer 框架需要tensorflow1.6以上版本 `pip install --upgrade tensorflow` - `pip install --upgrade tenso...原创 2019-01-30 14:30:33 · 8472 阅读 · 1 评论 -
DCGAN(对应生成对抗网络例子中的代码)一直提示 类型问题,修改方案
tensorflow1.5 python2.7版本下执行,错误的解决。一、前言:1整个过程使用debuger方式执行,设置断点 。2重点执行时候用下面两种方法 1表示的按钮执行一步一步调试,能看到中间结果在每一步的值,2按钮直接跳出到出错前的位置。挨着debugger按钮的窗口是console,可以显示中间执行过程,最后停止后,看debugger窗口:'./data/fac...原创 2018-12-13 20:33:14 · 895 阅读 · 2 评论 -
Improved Techniques for Training GANs 代码执行中的坑 --python3.6 tf环境
个人电脑:/usr/bin/python3.6 /home/gden/PycharmProjects/improved-gan-master/mnist_svhn_cifar10/train_cifar_feature_matching.pyTraceback (most recent call last): File "/home/gden/PycharmProjects/improv...原创 2018-12-02 00:53:34 · 451 阅读 · 0 评论 -
conda虚拟环境建立:
使用Anaconda管理多个版本的Python环境:假设你已安装anaconda环境则往下进行操作,否则去安装该华景1、查看系统当前已有的Python环境,执行命令:conda info --envs发现现在环境只有anaconda自带的python2.7环境可以使python -V常看python版本信息conda env list 2、我想添加一个Python3.5的环境,执...原创 2018-12-01 22:10:50 · 919 阅读 · 0 评论 -
anaconda中新建虚拟环境,把这些需要的安装包都装到一个虚拟环境里面。
深度学习的代码,好多都需要安装一些安装包,在服务器上安装需要权限就很麻烦。看到网上有说把这些安装包一个个下载下来上传到服务器再安装,心累,想想工程量就很大~~~ 这时候就可以在anaconda中新建虚拟环境,把这些需要的安装包都装到一个虚拟环境里面。 首先,找到conda的路径。服务器上的conda在/usr/local/anaconda3/bin,注意直接cd到这个目录输入cond...原创 2018-12-01 10:18:56 · 18827 阅读 · 2 评论 -
真实机下 ubuntu 18.04 安装GPU +CUDA+cuDNN 以及其版本选择(亲测非常实用)
https://developer.nvidia.com/rdp/cudnn-archive个人分类: 深度学习 版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.youkuaiyun.com/u010801439/article/details/80483036ubuntu 18.04 安装GPU +CUDA+cuDNN :目前,大多情况下,能搜到的基本上都ub...原创 2018-12-04 18:09:23 · 8510 阅读 · 1 评论 -
Improved Techniques for Training GANs 代码执行中的坑 python3.6 tf环境
improved-gan-master:中的代码:**Status:** Archive (code is provided as-is, no updates expected)# improved-gancode for the paper "Improved Techniques for Training GANs"MNIST, SVHN, CIFAR10 experiment...原创 2018-11-26 22:17:22 · 1712 阅读 · 0 评论 -
gan-manifold-reg-master流行正则化gan代码执行
总结:1调试代码时候有错误可以用debuger模式,一步一步进行调试;2看错误提示要会看,不一定是最后一个错误行提示的问题;3版本问题引起的错误很多,一定要仔细看错误提示,如果是缺失某模块的话,一般直接install就行,如果权限问题 加 --user或者前面加sudo。4尝试print输出某中间结果,查看问题;5epcho次数适当降低,看看结果即可,否则太大运行时间太长。...原创 2018-11-24 22:10:44 · 997 阅读 · 0 评论 -
tensorflow 内存不足:Process finished with exit code 137 (interrupted by signal 9: SIGKILL)
tensorflow/stream_executor/cuda/cuda_driver.cc:967] failed to alloc 536870912 bytes on host: CUDA_ERProcess finished with exit code 137 (interrupted by signal 9: SIGKILL) 多方搜索,才知出现这个问题是因为内存使用过多...转载 2018-11-13 09:20:48 · 26133 阅读 · 9 评论 -
使用keras加载vgg16等模型权重文件失败的解决办法和模型.h5文件网盘下载地址
使用keras加载vgg16等模型权重文件失败的解决办法和模型.h5文件网盘下载地址2018年04月25日 11:47:26 _TFboy 阅读数:1364更多个人分类: 错误合集 版权声明:大家说好才是真的吼,承蒙看官老爷厚爱。欢迎常来茶馆做客,https://blankspace.cn. https://blog.youkuaiyun.com/icurious/article/details/...转载 2018-11-12 22:29:31 · 8165 阅读 · 12 评论 -
修改的 SFGAN代码 执行结果--21 类 ucmerced scene classification 256*256图像
SFGAN是 64*64 EuroSAT数据集上 27000图像 执行的效果很好 test样例80% 21 类 ucmerced scene classification 256*256图像 2100图像 test样例80%修改的 SFGAN代码 执行结果/home/gis/anaconda3/envs/pytguo35/bin/python /home/gis/Pycha...原创 2018-12-16 15:32:26 · 726 阅读 · 0 评论 -
sfgan执行matlab生成的文件,如果文件超过2g,会用v7.3格式保存 python读取时候格式发生变化
Please use HDF reader for matlab v7.3 files/home/gis/anaconda3/envs/pytguo35/bin/python /home/gis/PycharmProjects/guo/SFGAN-master/sfgan.pyTraceback (most recent call last): File "/home/gis/Pycha...原创 2019-01-05 16:16:17 · 1421 阅读 · 0 评论 -
tensorflow 内存不足:Process finished with exit code 137 (interrupted by signal 9: SIGKILL)
原来设置128图像一个batch,256*256 内存不够用后来改为64 batch多方搜索,才知出现这个问题是因为内存使用过多导致。我刚开始设置batch_size为5 迭代了137次出现了以上错误信息。按照网上说法将batch_size改为2迭代了3百多次停止。后来干脆设置为1,才没能出现以上错误信息。很是奇怪,觉得batch_size为1或者为2差别不大,应该不是根本原因,而是误打...原创 2019-01-15 21:28:06 · 4862 阅读 · 0 评论 -
Pycharm安装matplotlib
在终端中通过pip3安装matplotlib后,发现pycharm中引入会报错,查了一下发现可以在Pycharm中安装matplotlib来解决: 1. 打开Preferences,找到Project Interpreter,点“+”添加 2. 在输入框中输入matplotlib进行搜索,然后选中要安装的包并点击下方的install package 3. 此时如果发现安装特别慢,可以...原创 2019-01-07 16:44:17 · 7864 阅读 · 0 评论 -
AttributeError: module 'tensorflow.tools.api.generator.api.train' has no attribute 'SummaryWriter'
AttributeError: module 'tensorflow.tools.api.generator.api.train' has no attribute 'SummaryWriter' summary_writer = tf.train.SummaryWriter('/tmp/lstm_logs',session.graph)改为:summary_writer = t...原创 2018-11-04 17:07:26 · 4650 阅读 · 0 评论