tf.keras.utils.get_file error: TypeError: '<' not supported between instances of 'int' and 'NoneType'
Question:
everyone,
Recently I start to program with tensorflow 2.10.0, have the following codes in my ipynb file (Jupyter Notebook file):
if not data_dir.exists():
tf.keras.utils.get_file('free-spoken-digit-dataset-master.zip',origin="https://codeload.github.com/Jakobovski/free-spoken-digit-dataset/zip/refs/heads/master",extract=True,cache_dir='.',cache_subdir='data')
I want to download the file free-spoken-digit-dataset-master.zip from the URL https://codeload.github.com/Jakobovski/free-spoken-digit-dataset/zip/refs/heads/master
, after running the codes the following error message is displayed:
TypeError: '<' not supported between instances of 'int' and 'NoneType'
Has anyone faced this issue or similar issue before?
Also tried the following codes:
tf.keras.utils.get_file(origin="https://github.com/Jakobovski/free-spoken-digit-dataset/archive/v1.0.9.tar.gz",extract=True,cache_dir='.',cache_subdir='data')
The same error message was displayed:
TypeError: '<' not supported between instances of 'int' and 'NoneType'
Answers:
This code is running absolutely fine when I tried the same in jupyter notebook using TensorFlow 2.10
. Please check the screenshot below:
There might be an issue with the tensorflow installation. Please check this link to re-verify if you have installed tensorflow properly in your system with compatible python
version between 3.7 - 3.10
for TensorFlow 2.10
.
Thank you deeply, @TFer2, Stackoverflow is a good forum for software developers, people can almost find each answer here.
I already turned to other projects now. The correct way to loading the spoken_digit dataset is:
dataset,dataset_info=tfds.load("spoken_digit",split=[‘train’],as_supervised=True,with_info=True)
or
dataset=TFDatasets.builder(‘spoken_digit’).as_dataset()[‘train’]
.
everyone,
Recently I start to program with tensorflow 2.10.0, have the following codes in my ipynb file (Jupyter Notebook file):
if not data_dir.exists():
tf.keras.utils.get_file('free-spoken-digit-dataset-master.zip',origin="https://codeload.github.com/Jakobovski/free-spoken-digit-dataset/zip/refs/heads/master",extract=True,cache_dir='.',cache_subdir='data')
I want to download the file free-spoken-digit-dataset-master.zip from the URL https://codeload.github.com/Jakobovski/free-spoken-digit-dataset/zip/refs/heads/master
, after running the codes the following error message is displayed:
TypeError: '<' not supported between instances of 'int' and 'NoneType'
Has anyone faced this issue or similar issue before?
Also tried the following codes:
tf.keras.utils.get_file(origin="https://github.com/Jakobovski/free-spoken-digit-dataset/archive/v1.0.9.tar.gz",extract=True,cache_dir='.',cache_subdir='data')
The same error message was displayed:
TypeError: '<' not supported between instances of 'int' and 'NoneType'
This code is running absolutely fine when I tried the same in jupyter notebook using TensorFlow 2.10
. Please check the screenshot below:
There might be an issue with the tensorflow installation. Please check this link to re-verify if you have installed tensorflow properly in your system with compatible python
version between 3.7 - 3.10
for TensorFlow 2.10
.
Thank you deeply, @TFer2, Stackoverflow is a good forum for software developers, people can almost find each answer here.
I already turned to other projects now. The correct way to loading the spoken_digit dataset is:
dataset,dataset_info=tfds.load("spoken_digit",split=[‘train’],as_supervised=True,with_info=True)
or
dataset=TFDatasets.builder(‘spoken_digit’).as_dataset()[‘train’]
.