Something wrong with the creation of a Keras model with probabilistic layers.
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
- 28/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
- Lĩnh vực
- machine-learning
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện việc xây dựng mô hình được nêu trong issue với TensorFlow 2.17.0 và TensorFlow Probability 0.24, sau đó so sánh với TensorFlow 2.15.1 và TensorFlow Probability 0.22.1, vốn được báo cáo là hoạt động. Truy vết lỗi tương thích đầu vào tại tf_keras/src/engine/input_spec.py:251; công việc được xem là hoàn tất khi xác định được sự tương tác giữa các phiên bản và xác nhận được hành vi tương thích hoặc một fix có mục tiêu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I am applying the use of Keras models that utilize probabilistic layers. The model below, which used to work normally, now presents the following error:
inputs = tf.keras.Input(shape=(X_train.shape[1],))
x = layers.Dense(500, activation='relu')(inputs)
x2 = layers.Dense(350, activation='relu')(x)
x3 = layers.Dense(250, activation='relu')(x2)
x4 = layers.Dense(150, activation='relu')(x3)
x5 = layers.Dense(50, activation='relu')(x4)
x6 = layers.Dense(15, activation='relu')(x5)
y_variational = tfpl.DenseVariational(4, make_prior_fn=prior, make_posterior_fn=posterior, kl_weight=1/X_train.shape[0], activation='tanh')(x6)
distribution_params = layers.Dense(units=216*2)(y_variational)
outputs = tfpl.IndependentNormal(216)(distribution_params)
PBNN3 = tf.keras.Model(inputs=inputs, outputs=outputs)
AttributeError Traceback (most recent call last)
in <cell line: 8>()
6 x5 = layers.Dense(50, activation='relu')(x4) #15
7 x6 = layers.Dense(15, activation='relu')(x5)
----> 8 y_variational = tfpl.DenseVariational(4, make_prior_fn=prior, make_posterior_fn=posterior, kl_weight=1/X_train.shape[0], activation='tanh')(x6)
9 #y_variational = layers.Dense(10, activation='relu')(x)
10 distribution_params = layers.Dense(units=216*2)(y_variational)
1 frames
/usr/local/lib/python3.10/dist-packages/tf_keras/src/engine/input_spec.py in assert_input_compatibility(input_spec, inputs, layer_name)
249 )
250 if spec.min_ndim is not None:
--> 251 ndim = x.shape.rank
252 if ndim is not None and ndim < spec.min_ndim:
253 raise ValueError(
AttributeError: 'tuple' object has no attribute 'rank'
Something is not working with TensorFlow version 2.17.0 and TensorFlow Probability version 0.24. Still works for Tensorflow: 2.15.1 and TensorFlow Probability: 0.22.1.
Thank you!
- 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 7 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ó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
tensorflow/probability#2013 ·
Tất cả issue của tensorflow/probability
Issue tương tự
-
[Bug]: DoubleMLRDDData accepts a score_col that is no data column (as in its docstring example); the running variable then becomes a covariate and RDFlex failsCó thể đã có người làm @vrjdev đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
DoubleML/doubleml-for-py#455 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Install page: spectarf's CUDA engine fails with PyTorch for CUDA 13.0 (nvvmError: ERROR_INVALID_IR)Có thể đã có người làm @lukepolson đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
PyTomography/PyTomography#435 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
beginner friendly
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
aws-samples/sample-per-model-bedrock#821 ·
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 72/100
instadeepai/InstaNovo-FM#50 ·