当前位置:网站首页>tf.keras.utils.get_file()
tf.keras.utils.get_file()
2022-07-31 05:32:00 【Erosion_ww】
Action:
Downloads the file from the URL if it is not already in the cache.
By default, files located at the url source are downloaded to cache_dir ~/.keras, placed in the cache_subdir dataset, and given the filename fname.So the final location for the file example.txt is ~/.keras/datasets/example.txt.
Parameters:
tf.keras.utils.get_file(fname=None, # The name of the file.If the absolute path /path/to/file.txt is specified, the file will be saved in that location.If not, the original file name will be used.origin=None, # The origin URL of the file.untar=False, # Deprecated, replaced by the extract parameter.boolean, whether the file should be decompressedmd5_hash=None, # Deprecated, replaced by the file_hash parameter.md5 hash of the file used for verificationfile_hash=None, # Expected hash string for the file after downloading.Both sha256 and md5 hash algorithms are supported.cache_subdir='datasets', # A subdirectory under the Keras cache directory where files are stored.If the absolute path /path/to/folder is specified, the file will be saved in that location.hash_algorithm='auto', # Select the hash algorithm to verify the file.There are "md5", "sha256" and "auto".The default "auto" detects the hash algorithm in use.extract=False, # True Attempt to extract the file as an archive, such as tar or zip.archive_format='auto', # The archive format in which to try to extract the file.There are "auto", "tar", "zip" and "none".'tar' includes tar, tar.gz and tar.bz files.The default 'auto' corresponds to ['tar', 'zip'].None or an empty list will return no match found.cache_dir=None # Where to store cache files, when None defaults to the default directory ~/.keras/.)Return value
Path to the downloaded filespan>
Example
dataset_path = keras.utils.get_file("auto-mpg.data", "http://archive.ics.uci.edu/ml/machine-learning-databases/auto-mpg/auto-mpg.data")print(dataset_path)Downloading data from http://archive.ics.uci.edu/ml/machine-learning-databases/auto-mpg/auto-mpg.data32768/30286 [==================================] - 0s 7us/step'C:\\Users\\Wu Caifeng\\.keras\\datasets\\auto-mpg.data'
Main reference: tf.keras.utils.get_file | TensorFlow Core v2.9.1 (google.cn)
边栏推荐
猜你喜欢

Object Detection Study Notes

MySQL8--Windows下使用压缩包安装的方法

Apache DButils使用注意事项--with modifiers “public“

MySQL optimization slow log query

SQL injection of DVWA

MySQL_关于JSON数据的查询

Simple read operation of EasyExcel
![[Introduction to MySQL 8 to Mastery] Basics - silent installation of MySQL on Linux system, cross-version upgrade](/img/af/7a2cdcc6535c04c508c9ddf9ee0cb2.png)
[Introduction to MySQL 8 to Mastery] Basics - silent installation of MySQL on Linux system, cross-version upgrade

Redis Advanced - Cache Issues: Consistency, Penetration, Penetration, Avalanche, Pollution, etc.
![【JS面试题】面试官:“[1,2,3].map(parseInt)“ 输出结果是什么?答上来就算你通过面试](/img/7a/c70077c7a95137aaeb49c344c82696.png)
【JS面试题】面试官:“[1,2,3].map(parseInt)“ 输出结果是什么?答上来就算你通过面试
随机推荐
torch.normal函数用法
Why use Flink and how to get started with Flink?
mysql 的简单运用命令
Apache DButils使用注意事项--with modifiers “public“
Pytorch教程Introduction中的神经网络实现示例
C语言教程(二)-printf及c自带的数据类型
MySQL (updating)
C语言实验五 循环结构程序设计(二)
Data set partitioning and cross-validation
C语言如何分辨大小端
Reference code series_1. Hello World in various languages
CentOS7 - yum install mysql
运用flask框架发送短信验证码的流程及具体代码
如何将项目部署到服务器上(全套教程)
Tapdata 与 Apache Doris 完成兼容性互认证,共建新一代数据架构
剑指offer专项突击版 ---- 第1天
Anaconda配置环境指令
MySQL8.0安装教程,在Linux环境安装MySQL8.0教程,最新教程 超详细
Moment Pool Cloud quickly installs packages such as torch-sparse and torch-geometric
【mysql 提高查询效率】Mysql 数据库查询好慢问题解决