`tensorflow_graphics.shape.check_static(...)` throwing error in TF2
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
- 42/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
- computer-graphics, machine-learning
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện lỗi của TensorFlow 2 trong graph-mode với lớp RandomRot được báo cáo và việc sử dụng Dataset. Đọc tensorflow_graphics/geometry/transformation/rotation_matrix_3d.py quanh from_euler và tensorflow_graphics/util/shape.py quanh check_static và _get_dim; hoàn thành khi cùng đường dẫn biên dịch đồ thị không còn phát sinh AttributeError đã được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I was writing a data augmentation layer for a PointNet implementation and ran into what appears to be a bug in tensorflow_graphics.shape.check_static(...), as seen on this line.
Offending layer:
class RandomRot(Layer):
def __init__(self):
super(RandomRot, self).__init__()
def build(self, input_shape):
self.s = tf.constant([input_shape[-1],])
def call(self, inputs, training=None):
if not training: return inputs
r = tf.random.uniform(
shape=self.s,
minval=0,
maxval=6.28,
)
return tf.linalg.matmul(inputs,from_euler(r))
Error message:
AttributeError: in user code:
<ipython-input-135-d11754641da6>:81 call *
self.x = self.r(self.x,training)
<ipython-input-130-07bfe7ac5ab9>:25 call *
return tf.linalg.matmul(inputs,from_euler(r))
/usr/local/lib/python3.6/dist-packages/tensorflow_graphics/geometry/transformation/rotation_matrix_3d.py:201 from_euler *
shape.check_static(
/usr/local/lib/python3.6/dist-packages/tensorflow_graphics/util/shape.py:206 check_static *
if _get_dim(tensor, axis) != value:
/usr/local/lib/python3.6/dist-packages/tensorflow_graphics/util/shape.py:135 _get_dim *
return tensor.shape[axis].value
AttributeError: 'int' object has no attribute 'value'
It appears that check_static is expecting each element from .shape to be a tensor, but in TF2 they're just ints. If I comment out check_static from from_euler, the function works fine. Strangely enough, it seems to work fine for tensors in eager execution, and only seems to throw errors when using Dataset objects with graph compilation.
- Ngôn ngữ chính
- Python
- Star
- 2.8k
- Fork
- 374
- Merge trung bình
- 5 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 1
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/graphics
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
tensorflow/graphics#468 ·
-
Missing TFRecord Generation Script/Instructions for projects/points_to_3Dobjects (CVPR 2021)Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
tensorflow/graphics#5337 ·
-
Attribute Error in the models.pyĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
tensorflow/graphics#730 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
tensorflow/graphics#729 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
tensorflow/graphics#724 ·
Tất cả issue của tensorflow/graphics
Issue tương tự
-
`destroy` sans terminal répond « Aborted. » au lieu de réclamer `--yes` comme `clean` et `reset`Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
stephrobert/dsoxlab#354 ·
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 77/100
jasonacox/pypowerwall#472 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[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
-
[Bug]: Python mod.Box[T] annotation gets a false generic_arg edge that replaces the parameter_type one ('is' on tree-sitter nodes)Có thể đã có người làm @rohit-jsfreaky đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Graphify-Labs/graphify#5110 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
assafelovic/gpt-researcher#2277 ·
Maintainer thường phản hồi trong vòng 10 ngày