google-deepmind / google-deepmind/tree

dm-tree & tree

Open
#117 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1k
Forks
73
PR merge metrics
No merged PRs in 30d

Description

I am using python 3.12.0 with tensorflow 2.16.1 and keras 3.0.5
I've been trying my hands on ML & CNN. To aid my understanding, I copied some sample codes from some sites and, when I try executing them, I keep getting errors which indicate that the tree version I'm using is not the right one.
Two such errors are: 'Module tree does not have the attribute flatten'
and 'Module tree has no attribute map_structure'
I began by doing the following:
1. I did pip install dm-tree and the installation was successful
2. Then I did import tree from within my program.
My observation is as follows:
The import in (2) does not use the dm-tree in (1) because the system keeps reporting 'Module tree does not have the attribute flatten'. But dm-tree surely contains the attribute 'flatten'.
To confirm that the import in (2) is not using the dm-tree in (1), I did pip uninstall dm-tree, then import tree as in (2) above, and the system still carried out the import without reporting that module tree is missing.
So, what is the sure-proof way of dealing with dm-tree and tree conflict? Thanks for any assistance.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.