Inception_V3模型下载

这篇个人笔记介绍了如何下载和处理Inception_V3模型,包括导入所需库、设定模型存储路径、下载模型、解压文件,并强调了`os.path`和`tarfile`模块在过程中的作用,最终目标是使用classify_image_graph_def.pb模型进行图像分类。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

个人笔记 感谢指正

Inception_V3下载

1.导入库
import tensorflow as tf
import os
import tarfile
import requests
from tqdm import tqdm
2.inception_v3下载地址
inception_pretrain_model_url = 'http://download.tensorflow.org/models/image/imagenet/inception-2015-12-05.tgz'
3.模型本地存储地址
inception_pretrain_model_dir = 'inception_model'
if not os.path.exists(inception_pretrain_model_dir):
    os.makedirs(inception_pretrain_model_dir)

#os.path.exists(dir)函数: 用于判断系统中是否有路径dir

#os.path.makedirs()函数:Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except that any intermediate path segment (not just the rightmost) will be created if it does not exist. If the target directory already exists, raise an OSError if exist_ok

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值