Skip to content

KerasCV on Google Colab #2376

@innat

Description

@innat

Tried to install keras-cv in colab with latest packages but got the following issue. However, this might be issue with colab and not keras-cv - not sure!!

!pip install --upgrade keras-cv-nightly tf-nightly keras-nightly

import tensorflow as tf
tf.__version__
2.17.0-dev20240310

import keras
keras.__version__
3.1.0.dev2024031103

import keras_cv
keras_cv.__version__
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
[<ipython-input-5-e37ee6d8d2a2>](https://localhost:8080/#) in <cell line: 1>()
----> 1 import keras_cv
      2 keras_cv.__version__

10 frames
[/usr/local/lib/python3.10/dist-packages/keras/api/_v2/keras/__internal__/backend/__init__.py](https://localhost:8080/#) in <module>
      1 """AUTOGENERATED. DO NOT EDIT."""
      2 
----> 3 from keras.src.backend import _initialize_variables as initialize_variables
      4 from keras.src.backend import track_variable

ImportError: cannot import name '_initialize_variables' from 'keras.src.backend' (/usr/local/lib/python3.10/dist-packages/keras/src/backend/__init__.py)

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------

Metadata

Metadata

Labels

type:BugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions