Skip to content

ModuleNotFoundError: No module named 'keras.legacy_tf_layers' #2372

@akshatsingh22

Description

@akshatsingh22

Is there an existing issue for this?

  • I have searched the existing issues

Bug description

ModuleNotFoundError: No module named 'keras.legacy_tf_layers'

Google Colab!

Operating System

operating system: Google Colab

DeepLabCut version

dlc version: 2.3.5

DeepLabCut mode

single animal

Device type

gpu: Nvidia Tesla V100

Steps To Reproduce

from google.colab import drive
drive.mount('/content/drive')

!pip install deeplabcut

import os
import deeplabcut

!unzip 'MyProject.zip'

config_path = '/content/MyProject/config.yaml'

deeplabcut.create_training_dataset(
config_path,
num_shuffles=1,
net_type="resnet_50",
augmenter_type='imgaug'
)

deeplabcut.train_network(config_path,
shuffle=1,
trainingsetindex=0,
gputouse=None,
max_snapshots_to_keep=3,
autotune=False,
displayiters=10,
saveiters=1000,
maxiters=10000,
allow_growth=True)

Relevant log output

/usr/lib/python3.10/importlib/_bootstrap.py in _gcd_import(name, package, level)

/usr/lib/python3.10/importlib/_bootstrap.py in _find_and_load(name, import_)

/usr/lib/python3.10/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)

/usr/lib/python3.10/importlib/_bootstrap.py in _call_with_frames_removed(f, *args, **kwds)

/usr/lib/python3.10/importlib/_bootstrap.py in _gcd_import(name, package, level)

/usr/lib/python3.10/importlib/_bootstrap.py in _find_and_load(name, import_)

/usr/lib/python3.10/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)

ModuleNotFoundError: No module named 'keras.legacy_tf_layers'

Anything else?

No response

Code of Conduct

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions