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

Đang mở
#247 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python, tensorflow
Lĩnh vực
machine-learning

Hướng nghiên cứu

Tái hiện lỗi bằng cách cài đặt tensorflow-privacy và chạy python mnist_dpsgd_tutorial.py. Bắt đầu từ privacy/tutorials/mnist_dpsgd_tutorial_common.py, đặc biệt là get_cnn_model và lệnh gọi Conv2D được hiển thị trong traceback. Được xem là hoàn tất khi tutorial MNIST DPSGD chạy qua AttributeError này với các phiên bản TensorFlow đã nêu.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Python
Star
2k
Fork
477
Merge trung bình
17 giờ 24 phút
Pull request đã merge (30 ngày)
4

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của tensorflow/privacy

Tất cả issue của tensorflow/privacy

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.