随笔分类 - tensorflow
摘要:1、图片维度增减 tf.expand_dims(input, 0) #(256, 256, 3) -> (1, 256, 256, 3)input[tf.newaxis, ...] #(256, 256, 3) ->(1, 256, 256, 3)
阅读全文
摘要:1、显示模型结构(model architecture) generator = Generator() tf.keras.utils.plot_model(generator, show_shapes = True, dpi=64) 2、
阅读全文
摘要:安装环境tensorflow2.5+python3.8.8 https://blog.csdn.net/xubuhui/article/details/100915320 1、下载模型源码 下载地址:https://github.com/tensorflow/models 2、安装protoc 地址
阅读全文
摘要:一、一般模型搭建 1、使用sequential建立模型 data_augmentation = keras.Sequential([ layers.experimental.preprocessing.RandomFlip("horizontal", input_shape=(img_height,
阅读全文
摘要:一、数据加载 1、加载文件夹下图片数据:不同类图片放在不同的文件夹下 batch_size = 32 #next(iter(train_ds)),一次迭代32张图片img_height = 224img_width = 224 train_ds = tf.keras.preprocessing.im
阅读全文
摘要:https://blog.csdn.net/weixin_40922744/article/details/102872607:docker安装、docker部署深度学习模型 一 、docker安装 二、使用docker拉取TensorFlow Serving最新版镜像 docker pull te
阅读全文