MNIST issues. Ridiculously frustrating.
I copied the following code exactly as given in the lecture:
import numpy as np
import tensorflow as tp
import tensorflow_datasets as tfds mnist_dataset= tfds.load(name='mnist', with_info=True, as_supervised=True) I get about a million errors as follows:
import tensorflow as tp
import tensorflow_datasets as tfds mnist_dataset= tfds.load(name='mnist', with_info=True, as_supervised=True) I get about a million errors as follows:
--------------------------------------------------------------------------- UnimplementedError Traceback (most recent call last) ~\Anaconda3\envs\py3-TF2.0\lib\site-packages\tensorflow_datasets\core\utils\py_utils.py in try_reraise(*args, **kwargs) 398 try: --> 399 yield 400 except Exception: # pylint: disable=broad-except ~\Anaconda3\envs\py3-TF2.0\lib\site-packages\tensorflow_datasets\core\registered.py in builder(name, **builder_init_kwargs) 243 prefix="Failed to construct dataset {}".format(name)): --> 244 return builder_cls(name)(**builder_kwargs) 245 ~\Anaconda3\envs\py3-TF2.0\lib\site-packages\tensorflow_datasets\core\api_utils.py in disallow_positional_args_dec(fn, instance, args, kwargs) 68 _check_required(fn, kwargs) ---> 69 return fn(*args, **kwargs) 70 ~\Anaconda3\envs\py3-TF2.0\lib\site-packages\tensorflow_datasets\core\dataset_builder.py in __init__(self, data_dir, config, version) 205 else: # Use the code version (do not restore data) --> 206 self.info.initialize_from_bucket() 207 ~\Anaconda3\envs\py3-TF2.0\lib\site-packages\tensorflow_datasets\core\dataset_info.py in initialize_from_bucket(self) 422 tmp_dir = tempfile.mkdtemp("tfds") --> 423 data_files = gcs_utils.gcs_dataset_info_files(self.full_name) 424 if not data_files: ~\Anaconda3\envs\py3-TF2.0\lib\site-packages\tensorflow_datasets\core\utils\gcs_utils.py in gcs_dataset_info_files(dataset_dir) 69 """Return paths to GCS files in the given dataset directory.""" ---> 70 return gcs_listdir(posixpath.join(GCS_DATASET_INFO_DIR, dataset_dir)) 71 ~\Anaconda3\envs\py3-TF2.0\lib\site-packages\tensorflow_datasets\core\utils\gcs_utils.py in gcs_listdir(dir_name) 62 root_dir = gcs_path(dir_name) ---> 63 if _is_gcs_disabled or not tf.io.gfile.exists(root_dir): 64 return None ~\Anaconda3\envs\py3-TF2.0\lib\site-packages\tensorflow\python\lib\io\file_io.py in file_exists_v2(path) 266 try: --> 267 _pywrap_file_io.FileExists(compat.as_bytes(path)) 268 except errors.NotFoundError: UnimplementedError: File system scheme 'gs' not implemented (file: 'gs://tfds-data/dataset_info/mnist/3.0.1') During handling of the above exception, another exception occurred: TypeError Traceback (most recent call last) <ipython-input-16-0886484aa3d0> in <module> 1 # Load the data ----> 2 mnist_dataset, mnist_info = tfds.load(name='mnist', with_info=True, as_supervised=True) ~\Anaconda3\envs\py3-TF2.0\lib\site-packages\tensorflow_datasets\core\api_utils.py in disallow_positional_args_dec(fn, instance, args, kwargs) 67 _check_no_positional(fn, args, ismethod, allowed=allowed) 68 _check_required(fn, kwargs) ---> 69 return fn(*args, **kwargs) 70 71 return disallow_positional_args_dec(wrapped) # pylint: disable=no-value-for-parameter ~\Anaconda3\envs\py3-TF2.0\lib\site-packages\tensorflow_datasets\core\registered.py in load(name, split, data_dir, batch_size, shuffle_files, download, as_supervised, decoders, read_config, with_info, builder_kwargs, download_and_prepare_kwargs, as_dataset_kwargs, try_gcs) 366 data_dir = constants.DATA_DIR 367 --> 368 dbuilder = builder(name, data_dir=data_dir, **builder_kwargs) 369 if download: 370 download_and_prepare_kwargs = download_and_prepare_kwargs or {} ~\Anaconda3\envs\py3-TF2.0\lib\site-packages\tensorflow_datasets\core\registered.py in builder(name, **builder_init_kwargs) 242 with py_utils.try_reraise( 243 prefix="Failed to construct dataset {}".format(name)): --> 244 return builder_cls(name)(**builder_kwargs) 245 246 ~\Anaconda3\envs\py3-TF2.0\lib\contextlib.py in __exit__(self, type, value, traceback) 128 value = type() 129 try: --> 130 self.gen.throw(type, value, traceback) 131 except StopIteration as exc: 132 # Suppress StopIteration *unless* it's the same exception that ~\Anaconda3\envs\py3-TF2.0\lib\site-packages\tensorflow_datasets\core\utils\py_utils.py in try_reraise(*args, **kwargs) 399 yield 400 except Exception: # pylint: disable=broad-except --> 401 reraise(*args, **kwargs) 402 403 ~\Anaconda3\envs\py3-TF2.0\lib\site-packages\tensorflow_datasets\core\utils\py_utils.py in reraise(prefix, suffix) 390 suffix = '\n' + suffix if suffix else '' 391 msg = prefix + str(exc_value) + suffix --> 392 six.reraise(exc_type, exc_type(msg), exc_traceback) 393 394 TypeError: __init__() missing 2 required positional arguments: 'op' and 'message'
Can anyone help me please? I'm completely stuck here. I am very new to learning this, so running
into all these errors that aren't covered in any tutorial can be very frustrating to someone like me
who is completely new to this. Any help would be appreciated!!
-Chris
1 answers ( 0 marked as helpful)
I made an account just to respond to this. Unfortunately I am having the same problem and have not been able to find a solution. Although I would suggest try downgrading to tensorflow-datasets==2.1.0.