Reputation: 1
As a personal project; I want to train a model to get distance from RGB images.
I try to download a dataset from this link 'http://diode-dataset.s3.amazonaws.com/train.tar.gz' using tensorflow like this
import tensorflow_datasets as tfds
tensorflow.download.DownloadManager('http://diode-dataset.s3.amazonaws.com/train.tar.gz')
but I get this error "download_and_extract() missing 1 required positional argument: 'url_or_urls'"
So I tried
tensorflow.download.DownloadManager(url_or_urls='http://diode-dataset.s3.amazonaws.com/train.tar.gz')
but I get this error
"download_and_extract() missing 1 required positional argument: 'self' "
any suggestions?
Upvotes: 0
Views: 801
Reputation: 1552
The tensorflow_datasets
download manager is a class, so you have to instantiate it before using it. This works for me:
import tensorflow_datasets as tfds
# create an instance of `DownloadManager` first
dm = tfds.download.DownloadManager(download_dir='/tmp')
# use it to download datasets
dm.download('http://diode-dataset.s3.amazonaws.com/train.tar.gz')
Upvotes: 3