PixelCNN example from the documentation does not work
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- jupyter-notebook, python, tensorflow
- Lĩnh vực
- documentation, machine-learning
Hướng nghiên cứu
Bắt đầu với ví dụ PixelCNN tại URL tài liệu API TensorFlow Probability và tái hiện ví dụ đó trong Google Colab với TensorFlow 2.19. Kiểm tra lỗi tại dist.log_prob(image_input) và lần theo ngoại lệ KerasTensor được báo cáo. Công việc được coi là hoàn tất khi ví dụ được tài liệu hóa chạy thành công mà không có ngoại lệ này.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
How to repro?
TF version: 2.19.0
- Take an example from https://www.tensorflow.org/probability/api_docs/python/tfp/distributions/PixelCNN#examples
- Create Google Colab
- Past the example into the Google Colab
- Run it
The following exception occurs:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[/tmp/ipython-input-624558695.py](https://localhost:8080/#) in <cell line: 0>()
33
34 # Define the log likelihood for the loss fn
---> 35 log_prob = dist.log_prob(image_input)
36
37 # Define the model
6 frames
<decorator-gen-128> in shape_v2(input, out_type, name)
[/usr/local/lib/python3.12/dist-packages/keras/src/backend/common/keras_tensor.py](https://localhost:8080/#) in __tf_tensor__(self, dtype, name)
154
155 def __tf_tensor__(self, dtype=None, name=None):
--> 156 raise ValueError(
157 "A KerasTensor cannot be used as input to a TensorFlow function. "
158 "A KerasTensor is a symbolic placeholder for a shape and dtype, "
ValueError: A KerasTensor cannot be used as input to a TensorFlow function. A KerasTensor is a symbolic placeholder for a shape and dtype, used when constructing Keras Functional models or Keras Functions. You can only use it as input to a Keras layer or a Keras operation (from the namespaces `keras.layers` and `keras.ops`). You are likely doing something like:
```
x = Input(...)
...
tf_fn(x) # Invalid.
```
What you should do instead is wrap `tf_fn` in a layer:
```
class MyLayer(Layer):
def call(self, x):
return tf_fn(x)
x = MyLayer()(x)
```
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 4.4k
- Fork
- 1.1k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của tensorflow/probability
-
KL divergence between two `TransformedDistribution`s with a shared non-injective bijector (`AbsoluteValue`) returns the base KLCó thể đã có người làm @Andreas-Hum đã nhận 8 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
tensorflow/probability#2036 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
tensorflow/probability#2034 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
tensorflow/probability#2021 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
tensorflow/probability#2015 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
tensorflow/probability#2012 · 1 bình luận ·
Tất cả issue của tensorflow/probability
Issue tương tự
-
Methodology pageĐang mởdocumentation site texts
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Krasnopjorovs/temet#66 ·
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
CopilotKit/CopilotKit#8283 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
hololinked-dev/hololinked#213 ·