tensorflow / tensorflow/privacy

AttributeError: 'Conv2D' object has no attribute 'apply'

Open
#247 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2k
Forks
477
Avg merge
22h 12m
Merged PRs (30d)
1

Description

I'm not sure if I'm doing something wrong, but I just ran: pip install tensorflow-privacy
then: python mnist_dpsgd_tutorial.py

And I'm getting the error:

File "/privacy/tutorials/mnist_dpsgd_tutorial_common.py", line 23, in get_cnn_model

y = tf.keras.layers.Conv2D(
16, 8, strides=2, padding='same', activation='relu').apply(input_layer)

AttributeError: 'Conv2D' object has no attribute 'apply'

Here are the versions of the modules that I have installed:

tensorboard 2.9.0 pypi_0 pypi
tensorboard-data-server 0.6.1 pypi_0 pypi
tensorboard-plugin-wit 1.6.0 py_0
tensorflow 2.9.1 pypi_0 pypi
tensorflow-datasets 4.5.2 pypi_0 pypi
tensorflow-estimator 2.9.0 pypi_0 pypi
tensorflow-gpu 2.4.1 h30adc30_0
tensorflow-io-gcs-filesystem 0.26.0 pypi_0 pypi
tensorflow-metadata 1.8.0 pypi_0 pypi
tensorflow-privacy 0.8.0 pypi_0 pypi
tensorflow-probability 0.15.0 pypi_0 pypi

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure by installing tensorflow-privacy and running python mnist_dpsgd_tutorial.py. Start at privacy/tutorials/mnist_dpsgd_tutorial_common.py, especially get_cnn_model and the Conv2D call shown in the traceback. Done means the MNIST DPSGD tutorial runs past this AttributeError with the reported TensorFlow versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
machine-learning
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.