download_and_cache: Download and Cache Weights (the torchvision way)

View source: R/utils.R

download_and_cacheR Documentation

Download and Cache Weights (the torchvision way)

Description

Download and Cache Weights (the torchvision way)

Usage

download_and_cache(url, redownload = FALSE, timeout = 720)

Arguments

url

the URL of the model to download

redownload

should the weights be downloaded fresh even if they're cached? This is not currently exposed to the end user, and exists

timeout

the download timeout

Value

path of the cached file

Examples

url <- "https://media.githubusercontent.com/media/cregouby/docformer_models/main/inst/tiny-layoutlm.pth"
weight <- download_and_cache(url=url)

cregouby/docformer documentation built on May 27, 2023, 11:19 p.m.