Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute Error #62

Open
Zumbalamambo opened this issue Aug 7, 2020 · 15 comments
Open

Attribute Error #62

Zumbalamambo opened this issue Aug 7, 2020 · 15 comments
Labels
bug Something isn't working tensorflow An issue with Tensorflow

Comments

@Zumbalamambo
Copy link

It's throwing the following error when I tried in Colab.

AttributeError                            Traceback (most recent call last)
<ipython-input-34-d4e8df5c5807> in <module>()
      6     epochs=100,
      7     n_workers=8,
----> 8     steps_per_epoch=200,
      9 )

8 frames
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/callbacks.py in _get_file_path(self, epoch, logs)
   1333                      'Reason: {}'.format(self.filepath, e))
   1334     self._write_filepath = distributed_file_utils.write_filepath(
-> 1335         file_path, self.model.distribute_strategy)
   1336     return self._write_filepath
   1337 

AttributeError: 'DeepLabCut' object has no attribute 'distribute_strategy'
@JoshuaMcGraw
Copy link

JoshuaMcGraw commented Aug 12, 2020

I am also having this same error - using only the provided example notebook (step3_train_model.ipynb) and data (/deepposekit-data/datasets/fly/).

AttributeError                            Traceback (most recent call last)
<ipython-input-25-8c07752fea11> in <module>()
      6     epochs=200,
      7     n_workers=8,
----> 8     steps_per_epoch=None,
      9 )

8 frames
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/callbacks.py in _get_file_path(self, epoch, logs)
   1333                      'Reason: {}'.format(self.filepath, e))
   1334     self._write_filepath = distributed_file_utils.write_filepath(
-> 1335         file_path, self.model.distribute_strategy)
   1336     return self._write_filepath
   1337 

AttributeError: 'StackedDenseNet' object has no attribute 'distribute_strategy'

@Zumbalamambo
Copy link
Author

@JoshuaMcGraw why?

@JoshuaMcGraw
Copy link

@JoshuaMcGraw why?

Yes, that certainly is the question. I'll mention that I am using a Conda env with Python 3.8 and Tensorflow 2.3.0 and DeepPoseKit 0.3.9. I have reproduced this error on three different machines using the same versions.

@JoshuaMcGraw
Copy link

JoshuaMcGraw commented Aug 15, 2020

AttributeError: 'DeepLabCut' object has no attribute 'distribute_strategy'

I suggest running DeepPoseKit with Python <=3.7 and Tensorflow <=2.0.0. It doesn't seem like newer versions are supported.

@stale
Copy link

stale bot commented Aug 22, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added stale Issue has been inactive for 7 days and removed stale Issue has been inactive for 7 days labels Aug 22, 2020
@stale
Copy link

stale bot commented Aug 29, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added stale Issue has been inactive for 7 days and removed stale Issue has been inactive for 7 days labels Aug 29, 2020
@stale
Copy link

stale bot commented Sep 5, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added stale Issue has been inactive for 7 days and removed stale Issue has been inactive for 7 days labels Sep 5, 2020
@Zumbalamambo
Copy link
Author

+1 Active issue

@JoshuaMcGraw
Copy link

@Zumbalamambo What version of DeepPoseKit, Python, and Tensorflow are you using?

I suggest running DeepPoseKit with Python <=3.7 and Tensorflow <=2.0.0. It doesn't seem like newer versions are supported.

@jgraving jgraving added bug Something isn't working tensorflow An issue with Tensorflow labels Sep 7, 2020
@Zumbalamambo Zumbalamambo reopened this Sep 8, 2020
@Zumbalamambo
Copy link
Author

@JoshuaMcGraw I use the latest version of tensorflow

@eduramiba
Copy link
Contributor

This happens with tensorflow 2.3.1 at least, but not with 2.2.0

@Funkyojo
Copy link

I had the same issue on the Colab notebook step 3 today. Is it possible that you guys fix the notebook?

@Cyril9227
Copy link

Can be fixed when adding :

physical_devices = tf.config.list_physical_devices('GPU')
tf.config.experimental.set_memory_growth(physical_devices[0], True)

model.distribute_strategy = tf.distribute.MirroredStrategy()

@ghost
Copy link

ghost commented Dec 23, 2021

Can be fixed when adding :

physical_devices = tf.config.list_physical_devices('GPU')
tf.config.experimental.set_memory_growth(physical_devices[0], True)

model.distribute_strategy = tf.distribute.MirroredStrategy()

hello.
Where to put these three lines of code.

@liuxi1998
Copy link

where to put codes>
physical_devices = tf.config.list_physical_devices('GPU')
tf.config.experimental.set_memory_growth(physical_devices[0], True)

model.distribute_strategy = tf.distribute.MirroredStrategy()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tensorflow An issue with Tensorflow
Projects
None yet
Development

No branches or pull requests

7 participants