当前位置:网站首页>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)
边栏推荐
猜你喜欢
Summary of MySQL common interview questions (recommended collection!!!)
Numpy中np.meshgrid的简单用法示例
【LeetCode-SQL每日一练】——2. 第二高的薪水
【一起学Rust】Rust学习前准备——注释和格式化输出
MySQL optimization slow log query
MySQL-如何分库分表?一看就懂
MySQL_关于JSON数据的查询
面试官竟然问我怎么分库分表?幸亏我总结了一套八股文
Anaconda configure environment directives
剑指offer专项突击版 ---- 第2天
随机推荐
Kubernetes 证书可用年限修改
C语言实验一 熟悉C程序的环境
CentOS7 - yum install mysql
DVWA shooting range environment construction
Multiple table query of sql statement
Go中间件
Redis Advanced - Cache Issues: Consistency, Penetration, Penetration, Avalanche, Pollution, etc.
剑指offer基础版 ----- 第28天
Temporal线上部署
一文了解大厂的DDD领域驱动设计
C语言教程(二)-printf及c自带的数据类型
MySQL-如何分库分表?一看就懂
With MVC, why DDD?
Minio upload file ssl certificate is not trusted
质量小议12 -- 以测代评
Object Detection Study Notes
The monitoring of Doris study notes
Moment Pool Cloud quickly installs packages such as torch-sparse and torch-geometric
matlab simulink欠驱动水面船舶航迹自抗扰控制研究
torch.normal函数用法