python
liuhongshuo2012
这个作者很懒,什么都没留下…
展开
-
Tensorflow2模型保存读取
采用keras库保存、读取模型创建模型以手写数字集mnist为例,加载数据,创建简单模型import tensorflow as tffrom tensorflow import keras(train_images, train_labels), (test_images, test_labels) = tf.keras.datasets.mnist.load_data()train_images = train_images.reshape(-1, 28 * 28) / 255.0te原创 2020-08-12 18:44:21 · 561 阅读 · 0 评论 -
TensorFlow池化操作
卷积操作之后往往执行池化操作,进一步压缩数据池化池化函数将平面内某一位置及其相邻位置的特征值进行统计汇总,并将汇总后的结果作为这一位置在该平面内的值。常见的池化操作有最大池化、平均池化。TensorFlow中池化函数tf.nn.max_pool最大池化tf.nn.max_pool( input, ksize, strides, padding, data_format=None, name=None)参数讲解input秩N + 2张量,形状的[batch_si原创 2020-08-05 17:43:51 · 821 阅读 · 0 评论 -
TensorFlow卷机操作
tf.nn.conv2d计算给定的2-d卷积input和4- d filters张量。tf.nn.conv2d( input, filters, strides, padding, data_format='NHWC', dilations=None, name=None)参数讲解input一个Tensor 。一定是以下类型之一: half , bfloat16 , float32 , float64 。至少为4的尺寸顺序是根据的值解释秩的张量data_format原创 2020-08-05 16:21:13 · 201 阅读 · 0 评论 -
conda 创建多个python环境
创建环境:conda create -n AICV37 python=3.7查看环境:conda env list激活环境source activate AICV37安装软件包conda install OpenCV卸载软件包conda uninstall OpenCV安装时遇到错误,the following packages are not available from current channels dlib。强制安装conda install -c conda-f原创 2020-07-29 16:05:34 · 423 阅读 · 0 评论 -
the following packages are not available from current channels dlib
安装python相关的依赖库(dlib)时提示一下错误:PackagesNotFoundError: The following packages are not available from current channels:dlibCurrent channels:https://repo.anaconda.com/pkgs/main/osx-64https://repo.anaconda.com/pkgs/main/noarchhttps://repo.anaconda.com/pk原创 2020-07-29 15:56:42 · 1926 阅读 · 0 评论