自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(47)
  • 问答 (1)
  • 收藏
  • 关注

原创 Win10系统+anaconda环境下安装tensorflow2.0(GPU)详细版

Win10系统+anaconda环境下安装tensorflow2.0(GPU)详细版之前在win7系统安装了anaconda3.4.0,tensorflow1.6-cpu版本的。但是由于电脑反应太慢,最简单的手写数字识别都很慢,得跑很长时间。因此现在换了一台电脑,用的是英伟达GTX1660Ti的显卡。1. 安装CUDN10.0必须安装10.0版本的,tf2.0只适合10.0版本的,其他的不行...

2020-04-11 22:23:41 1731 1

原创 ANSYS Workbench16教程学习01

ANSYS Workbench16教程学习01ansys worbench就是数值模拟,主要流程总结为3大步+3小布三大步主要包括:前处理+求解+后处理前处理:包括三小步,模型构建+材料的定义和赋予+网格划分求解:包括三小步,载荷边界条件+位移边界条件+网格划分后处理:包括三小步,常规结果(等效应力+应变+变形等)+路径+结果导出...

2022-01-09 23:53:19 1269

原创 错误ModuleNotFoundError: No module named ‘xlwt‘

错误代码:import xlwtModuleNotFoundError: No module named 'xlwt'解决办法:1 activate tf22 pip install xlwt完成!

2021-08-11 22:00:50 4536

原创 问题module ‘tensorboard-lazy’ has no attribute ‘lazy’

问题:AttributeError: module ‘tensorboard-lazy’ has no attribute ‘lazy’解决办法:1 打开cmd,激活环境。2 先卸载安装的tensorboard 和tensorflow.tensorboard。pip uninstall tensorboardpip uninstall tensorflow.tensorboard3 再安装新的版本。pip install tensorboard==2.3.0pip install ten

2021-06-01 16:12:21 2164

原创 TF2.0错误ModuleNotFoundError: No module named ‘tensorboard

错误代码:ModuleNotFoundError: No module named 'tensorboard解决办法:pip install tensorflow.tensorboard而不是 pip install tensorboard成功!!

2021-05-31 17:29:27 416

原创 Win10系统 -UG10.0软件超详细安装教程

Win10系统安装 UG10.0安装过程经历了大概五次,装了卸载,又装又卸载。安装始终有问题,终于在我耐心耗尽的时候,这一次成功了。为了避免大家也和我一样遇到很多坑和错误代码,在这里给出详细的安装步骤。一、安装前工作:关闭电脑上所有的杀毒软件,360,电脑管家等等。关闭 电脑防火墙。 此电脑——属性——控制面板——安全与安全——Windows Defender 防火墙——关闭防火墙。二**、安装包下载。**安装包很大,下载很慢,耐心等待就好。链接:https://pan.baidu.co

2021-04-19 16:33:09 33485 6

原创 Catia V5-6R2016安装教程 win10系统

参考文章:1 Catia V5-6R2016安装教程2 Catia V5-6R2016软件安装教程——附下载地址3 安装过程中,【打开SolidSQUAD文件夹】步骤时,会出现cmd 窗口闪退,并且没有出现 “许可证服务连接参数”的界面框,无法修改电脑名称和电脑ID,直接就完成安装,finish。但是后面双击打开时,会出现界面“没有许可证“的情况。说明安装失败问题原因是,因为我装的是***WIN10系统***,会出现不兼容的情况。解决办法:复制文件到其他系统的电脑,修改许可证服务连接参数中的电

2021-04-14 22:04:45 8501 1

原创 训练自己的SSD错误‘conv4_3_norm_mbox_loc‘ shape mismatch维度不匹配

错误描述用TF2.2版本训练自己的SSD模型,出现shape维度不匹配的问题。‘conv4_3_norm_mbox_loc’ shape mismatch原因:自己的数据集不是VOC2007的20类,而是5类,使用预训练模型**ssd_weight.py,**就会出现这个情况,需要重新训练模型.,生成自己的权重。运行 train.py%load train.py 然后再运行ssd.py注意修改类别数,还有权重。model_path和classes_path的路径。这里路径如果出现错误,请加载绝

2021-03-30 09:45:47 539

原创 错误ValueError: too many values to unpack (expected 5) During handling of the above exception。

错误显示ValueError: too many values to unpack (expected 5) During handling of the above, another exception occurred:错误代码dict = {}for i in dict(): pass解决办法1 是否在遍历字典的时候没有使用items;dict = {}for i in dict.items():pass2 在调用函数的时候,如果函数返回值是5个,而你只写了3个的话

2021-03-30 09:35:23 4082

原创 tf2.2运行SSD目标检测,出现错误ipykernel_launcher.py: error: unrecognized arguments:

*错误代码11 ipykernel_launcher.py: error: unrecognized arguments:错误提示import argparseparser = argparse.ArgumentParser()args = parser.parse_args()解决办法:将parser.parse_args() 改为 parser.parse_known_args()[0]import argparseparser = argparse.ArgumentP

2021-03-30 09:31:09 1892 1

原创 读取文件错误 OSError: [Errno 22] Invalid argument:

错误代码:OSError: [Errno 22] Invalid argument:解决办法:1 将相对路径改为绝对路径;2 将“/”改为“\” 试一下;3 在路径前面加上r;4 修改自己的文件名,文件名千万不要使用空格,不要使用空格,不要使用空格。 重要的事情说三遍1!1!!5 不要复制粘贴路径,将路径 重新手敲出来。(因为这个问题,我大概浪费了一下午时间,反复改都出现以上错误。)如果还是不行,那就把这些全部试一遍,总有一个是对的。...

2021-03-29 19:07:09 31246 13

原创 错误 WARNING:tensorflow:From <ipython-input-3-ddde76583c97>:112: Model.

错误显示:WARNING:tensorflow:From :112: Model.fit_generator (from tensorflow.python.keras.engine.training) is deprecated and will be removed in a future version. Instructions for updating: Please use Model.fit, which supports generators.原因新版的tf,取消了Model.fit_

2021-03-29 19:01:24 1657

原创 错误解决ModuleNotFoundError: No module named ‘imutils‘

ModuleNotFoundError: No module named 'imutils’解决办法:打开cmd激活你的环境:activate tensorflow安装: pip install imutils安装完成!

2021-03-25 09:25:59 5657 1

原创 Python中数组和向量相互转化

Python中数组[1,2,3,4]和向量[1 2 3 4]相互转化1 **首先,**搞清楚概念:python没有数组,只有元组(tuple)和列表(list)。因此不像列表,元组不能够在末尾追加(append)元素,弹出(pop)元素;只能对元组中的元素进行索引t[0],不能对其中的元组进行赋值t[0]=8。使用元组的好处在于对元组进行操作更为高效,适合存放一组常量。2 列表 转化为 向量import numpy as np a = np.array([[1,2,3,4,5]])#

2021-03-04 15:57:33 7189 1

原创 判断两个数组元素是否一致,一致返回1,不同返回0,返回数组

判断两个数组元素是否一致,一致返回1,不同返回0,返回数组。第一种方法,遍历所有元素。代码如下:def whethersame(a,b): res =[] for i in range(len(a)): if a[i]==b[i]: res.append(1) else: res.append(0) return res a=[1,2,3,4]b=[1,3,4,2]res=whethers

2021-03-04 11:21:06 1273 1

原创 错误NotImplementedError: Saving the model to HDF5 format requires the model to be a Functional model

tf2.0训练网络,使用官方预训练模型和权重时,在保存模型和参数时,出现这个错误:代码:model.save('model36_5.h5')model.save_weights('weight_tf_model36_5.h5')报错信息 NotImplementedError: Saving the model to HDF5 format requires the model to be a Functional model or a Sequential model. It

2021-02-03 19:52:58 1645

原创 错误AttributeError: ‘tensorflow.python.framework.ops.EagerTensor‘ object has no attribute ‘compile‘

错误代码:1 AttributeError: ‘tensorflow.python.framework.ops.EagerTensor’ object has no attribute ‘compile’2AttributeError:Tensor.graph is meaningless when eager execution is enabled.AttributeError: 'tensorflow.python.framework.ops.EagerTensor' object has n

2021-01-19 21:24:37 3625 2

原创 错误NameError: name ‘tfa‘ is not defined

@NameError: name ‘tfa’ is not defined出错代码optimizer = tfa.optimizers.SWA(tf.keras.optimizers.SGD(lr=2.0), 100, 10)解决问题1 下载内置模块pip install tensorflow-addons#pip install tensorflow-addonsimport tensorflow_addons as tfaoptimizer = tfa.optimizers.SWA(t

2021-01-18 12:05:04 988

原创 tf2.0如何读取数据集图片jpg格式的标签文件夹

@tf2.0如何读取数据集jpg格式的标签文件夹,即y_test我们的数据集是如下形式,内部都是jpg格式:一 tensorflow2.0-从文件夹中读取图片数据导入包:from tensorflow.keras.preprocessing.image import ImageDataGeneratorImageDataGenerator-图片生成器,使用它在batch中对数据进行增强,扩充数据集大小,从而增强模型的泛化能力。keras.preprocessing.image.ImageD

2020-12-25 21:55:18 789

原创 数据读入文件和生成器对象

读入文件f = open('labels.csv') df_train = pd.read_csv(f)pd.read_csv() 括号里是文件名而不是路径f = open('xxx.csv',encoding='utf-8') data = pd.read_csv(f)生成器对象<generator object bigrams at 0x000001D5B9FC3AC0>函数返回的不是列表,而是一个“生成器对象”,原来生成器对象是一个可以产生数据,可迭代的一个对象。

2020-12-18 17:21:53 133 2

原创 错误InvalidArgumentError: Expected ‘tf.Tensor(False, shape=(), dtype=bool)‘ to be true. Summarized dat

错误显示:InvalidArgumentError: Expected ‘tf.Tensor(False, shape=(), dtype=bool)’ to be true. Summarized data: b’Unable to decode bytes as JPEG, PNG, GIF, or BMP’图片显示:错误原因:如果某个操作接收到的输入张量具有无效的值或形状,则可能发生该情况。汇总数据时,b’无法将字节解码为JPEG,PNG,GIF或BMP’格式。解决办法试了很多,但是一

2020-12-16 20:47:36 1683

原创 函数学习os.xxx()

os.path.exists()用于检查在某路径内是否存在某文件。返回值为falseos.mkdir(path)其参数path,为要创建目录的路径os.makedirs()函数创建多级目录。os.listdir()返回指定路径下的文件和文件夹列表。os.path.join()连接两个或更多的路径名组件os.path.isdir()判断某一路径是否为目录...

2020-12-16 19:08:46 86

原创 数据集分享*cifar-10 cifar-100 猫狗 康奈尔抓取数据集**

每次找添加链接描述公开数据集都很麻烦,找不到。现在把自己的知道的全部共享了有 cifar-10 cifar-100 猫狗 康奈尔抓取数据集链接:https://pan.baidu.com/s/1xHMT-KBk235P9Gsv1tWIJw提取码:v1jn复制这段内容后打开百度网盘手机App,操作更方便哦如果链接失败,可私我。...

2020-12-15 11:24:14 524 1

原创 tf2.0 错误AttributeError: module ‘tensorflow‘ has no attribute ‘enable_eager_execution‘

tensorflow2.0出现错误AttributeError: module ‘tensorflow’ has no attribute ‘enable_eager_execution’错误代码:启用动态图机制tf.enable_eager_execution()如图所示:错误原因:如果tensorflow为 2.0 版本 移除 了直接调用 enable_eager_execution() 的方式。新版本2.0加入了 eager模式,不需要调用。解决办法:把tf.enable_eage

2020-12-09 19:32:26 3391

原创 加载模型出现WARNING:tensorflow:Error in loading the saved optimizer state.

警告标识:WARNING:tensorflow:Error in loading the saved optimizer state. As a result, your model is starting with a freshly initialized optimizer.加载模型时。老是出现如下警告,虽然对代码没有影响,但是还是很烦。这个警告大概说:在加载保存的优化器状态时出错。因此,模型从一个新初始化的优化器开始。也就是每次重新加载模型,初始化的优化器都不一样。不用管他就好了。没有其

2020-11-04 19:47:08 3005 3

原创 ModuleNotFoundError: No module named ‘Resnet‘

错误代码:解决办法:pip install Resnet

2020-07-05 17:22:42 7135 2

原创 ModuleNotFoundError: No module named ‘tensorflow_datasets‘

出现错误,如下所示:解决办法:打开cmdactivate tensorflow_gpupip install tensorflow_datasets安装成功!

2020-07-04 15:52:18 1014

原创 MemoryError: Unable to allocate 469. MiB for an array with shape (20000, 32, 32, 3) and data type fl

错误显示:MemoryError: Unable to allocate 469. MiB for an array with shape (20000, 32, 32, 3) and data type float64错误原因:内存错误:无法分配469。用于具有形状(20000、32、32、3)和数据类型float64的数组的MiB。触发了系统的过量处理模式(overcommit handing)。这个矩阵似乎要占用的空间太大,所以系统就提前禁止创建了。解决办法:关闭其他无关的running

2020-06-04 12:15:41 20704 3

原创 InvalidArgumentError: Can not squeeze dim[1], expected a dimension of 1, got 10 for metrics/acc/

报错代码显示:InvalidArgumentError: Can not squeeze dim[1], expected a dimension of 1, got 10 for ‘metrics/acc/Squeeze’ (op: ‘Squeeze’) with input shapes: [?,10].错误原因:使用稀疏分类交叉熵的损失函数,模型的真实输出值得是一个索引index而不是one hot编码,比如你给定的真实输出值应该是0而非[1, 0, 0, 0, 0]解决办法1 修改损失函

2020-06-03 20:19:04 1907

原创 UnknownError: Failed to get convolution algorithm. This is probably because cuDNN failed to initial

训练一个卷积神经网络时,报这个错误。错误显示代码:无法获取卷积算法。这可能是因为cuDNN初始化失败,所以请尝试查看上面是否打印了警告日志消息。UnknownError: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.错误原因:报错翻

2020-05-29 11:05:45 4484 7

原创 ResourceExhaustedError: OOM when allocating tensor with shape[512] and type float on /job:localhost

运行resnet50程序时,出现这个错误。**原代码地址:**https://github.com/calmisential/TensorFlow2.0_ResNet错误显示:ResourceExhaustedError: OOM when allocating tensor with shape[512] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc[[node res_

2020-05-26 17:28:06 12831

原创 tensorflow2.0运行程序过程中错误汇总

ModuleNotFoundError: No module named ‘cv2’打开 CMD,activate tensorflow_gpupip install opencv-pythonModuleNotFoundError: No module named ‘tqdm’打开 CMD,activate tensorflow_gpupip install tqdm安装成功就行了。

2020-05-25 16:43:47 488

原创 word_index = imdb.get_word_index()由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败

执行代码是:imdb=keras.datasets.imdb(train_x, train_y), (test_x, text_y)=keras.datasets.imdb.load_data(num_words=10000)word_index = imdb.get_word_index()结果出错:Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/imdb_word_index.j

2020-05-22 14:54:12 1957 5

原创 解决问题 ModuleNotFoundError: No module named sklearn

原代码如下:from sklearn.model_selection import train_test_split错误显示:ModuleNotFoundError: No module named ‘sklearn’解决办法:1 打开cmd或者anaconda prompt2 activate tensorflow_gpu3 conda install sklearn在 cmd 中执行代码 conda install sklearn,又出错:PackagesNotFoundError:

2020-05-22 14:51:51 29532 5

原创 错误解决 ValueError: The estimator KerasClassifier should be a classifier.

ValueError: The estimator KerasClassifier should be a classifier.原代码:

2020-05-22 11:25:28 1694 3

原创 错误 Fashion-mnist下载失败的问题(连接尝试失败)

wen10 tf2.0 notebook运行程序代码如下(train_images, train_labels), (test_images, test_labels) = keras.datasets.fashion_mnist.load_data()

2020-05-19 10:12:44 904

原创 官网下载cifar10数据集过程太慢,自行下载之后还一直重复下载的问题

Win10+tensorflow2.0+GPU下载cifar-10数据集。运行程序时,数据集下载一直没反应,导致程序运行不出来。执行代码是:(x_train, y_train), (x_test, y_test) = tf.keras.datasets.cifar10.load_data()官网下载地址是:https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz所以我从百度网盘里面下载了数据集,总共163MB。然后,修改文件名称。cifa

2020-05-17 11:27:24 1940 2

原创 ValueError: Error when checking model input: the list of Numpy arrays that you are passing to your m

错误显示:ValueError: Error when checking model input: the list of Numpy arrays that you are passing to your model is not the size the model expected.代码如下:(x_train, y_train), (x_test, y_test) = keras.datasets.cifar10.load_data()x_train = x_train.astype(‘flo

2020-05-17 11:14:25 5525

原创 出错 InternalError: Blas GEMM launch failed : a.shape=(64, 784), b.shape=(784, 32), m=64, n=32, k=784

错误代码显示// 代码如下所示。主要是tensorflow2.0-GPU训练mnist数据集时,出错:InternalError: Blas GEMM launch failed : a.shape=(64, 784), b.shape=(784, 32), m=64, n=32, k=784// An highlighted blockvar foo = 'bar';# 模型的训练、验证和测试与训练模型完全相同# 下面使用mnist数据集进行展示(x_train, y_train), (

2020-05-15 22:09:55 5404

原创 报错importError: Failed to import pydot. You must install pydot and graphviz for `pydotprint` to work

安装可视化pydot时出现这个错误。##错误原因我先在cmd中安装了graphviz,然后再pip install pydot时,就出现错误提示:importError: Failed to import pydot. You must install pydot and graphviz for pydotprint to work。##解决看了广大网友的建议。我把graphviz卸载了,重新安装pydot。在CMD里面显示安装成功了;但是在notebook中跑程序时,还是之前这个错误——impo

2020-05-15 21:50:14 2220

空空如也

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

TA关注的人

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