Skip to main content
added 78 characters in body
Source Link
furas
  • 150.2k
  • 12
  • 128
  • 177

This tutorial is 5 years old and it seems it doesn't work as expected.

It seems it expects data in folder

/root/.keras/datasets/flower_photos/

but (using !ls -al /root/.keras/datasets/) I found it is in

/root/.keras/datasets/flower_photos.tgz/flower_photos/

So it needs

# data_dir = pathlib.Path(archive).with_suffix('')
data_dir = pathlib.Path(archive) / 'flower_photos'

After this change next lines work.


EDIT (2025.11.02):

It seems someone reported this problem half year ago. Maybe it will be fixed.

Fixing the dataset path for images.ipynb by kiransair · Pull Request #2361 · tensorflow/docs

In this issue I added link to this question - maybe this will help.

EDIT (2025.11.04):

It seems they finally changed this path on Google Colab.

This tutorial is 5 years old and it seems it doesn't work as expected.

It seems it expects data in folder

/root/.keras/datasets/flower_photos/

but (using !ls -al /root/.keras/datasets/) I found it in

/root/.keras/datasets/flower_photos.tgz/flower_photos/

So it needs

# data_dir = pathlib.Path(archive).with_suffix('')
data_dir = pathlib.Path(archive) / 'flower_photos'

After this change next lines work.


EDIT:

It seems someone reported this problem half year ago. Maybe it will be fixed.

Fixing the dataset path for images.ipynb by kiransair · Pull Request #2361 · tensorflow/docs

This tutorial is 5 years old and it seems it doesn't work as expected.

It seems it expects data in folder

/root/.keras/datasets/flower_photos/

but (using !ls -al /root/.keras/datasets/) I found it is in

/root/.keras/datasets/flower_photos.tgz/flower_photos/

So it needs

# data_dir = pathlib.Path(archive).with_suffix('')
data_dir = pathlib.Path(archive) / 'flower_photos'

After this change next lines work.


EDIT (2025.11.02):

It seems someone reported this problem half year ago. Maybe it will be fixed.

Fixing the dataset path for images.ipynb by kiransair · Pull Request #2361 · tensorflow/docs

In this issue I added link to this question - maybe this will help.

EDIT (2025.11.04):

It seems they finally changed this path on Google Colab.

added 232 characters in body
Source Link
furas
  • 150.2k
  • 12
  • 128
  • 177

This tutorial is 5 years old and it seems it doesn't work as expected.

It seems it expects data in folder

/root/.keras/datasets/flower_photos/

but (using !ls -al /root/.keras/datasets/) I found it in

/root/.keras/datasets/flower_photos.tgz/flower_photos/

So it needs

# data_dir = pathlib.Path(archive).with_suffix('')
data_dir = pathlib.Path(archive) / 'flower_photos'

After this change next lines work.


EDIT:

It seems someone reported this problem half year ago. Maybe it will be fixed.

Fixing the dataset path for images.ipynb by kiransair · Pull Request #2361 · tensorflow/docs

This tutorial is 5 years old and it seems it doesn't work as expected.

It seems it expects data in folder

/root/.keras/datasets/flower_photos/

but (using !ls -al /root/.keras/datasets/) I found it in

/root/.keras/datasets/flower_photos.tgz/flower_photos/

So it needs

# data_dir = pathlib.Path(archive).with_suffix('')
data_dir = pathlib.Path(archive) / 'flower_photos'

After this change next lines work.

This tutorial is 5 years old and it seems it doesn't work as expected.

It seems it expects data in folder

/root/.keras/datasets/flower_photos/

but (using !ls -al /root/.keras/datasets/) I found it in

/root/.keras/datasets/flower_photos.tgz/flower_photos/

So it needs

# data_dir = pathlib.Path(archive).with_suffix('')
data_dir = pathlib.Path(archive) / 'flower_photos'

After this change next lines work.


EDIT:

It seems someone reported this problem half year ago. Maybe it will be fixed.

Fixing the dataset path for images.ipynb by kiransair · Pull Request #2361 · tensorflow/docs

edited body
Source Link
furas
  • 150.2k
  • 12
  • 128
  • 177

This tutorial is 5 years old and it seems it doesn't work as expected.

It seems it expects data in folder

/root/.keras/datasets/flower_photos/

but (using !ls -al /root/.keras/datasets/) I fould imagesfound it in

/root/.keras/datasets/flower_photos.tgz/flower_photos/

So it needs

# data_dir = pathlib.Path(archive).with_suffix('')
data_dir = pathlib.Path(archive) / 'flower_photos'

After this change next lines work.

This tutorial is 5 years old and it seems it doesn't work as expected.

It seems it expects data in folder

/root/.keras/datasets/flower_photos/

but (using !ls -al /root/.keras/datasets/) I fould images in

/root/.keras/datasets/flower_photos.tgz/flower_photos/

So it needs

# data_dir = pathlib.Path(archive).with_suffix('')
data_dir = pathlib.Path(archive) / 'flower_photos'

After this change next lines work.

This tutorial is 5 years old and it seems it doesn't work as expected.

It seems it expects data in folder

/root/.keras/datasets/flower_photos/

but (using !ls -al /root/.keras/datasets/) I found it in

/root/.keras/datasets/flower_photos.tgz/flower_photos/

So it needs

# data_dir = pathlib.Path(archive).with_suffix('')
data_dir = pathlib.Path(archive) / 'flower_photos'

After this change next lines work.

added 41 characters in body
Source Link
furas
  • 150.2k
  • 12
  • 128
  • 177
Loading
Source Link
furas
  • 150.2k
  • 12
  • 128
  • 177
Loading