-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
einops are cool. However, at the time of this writing they don't really work with TensorFlow.
check_shapes already collects a bunch of information about tensor shapes - maybe that would be useful for einops-like operations:
@check_shapes(
"x: [N, D]",
)
def foo(x):
reshape(x, "[1, N*D]") # <-- We already know, from the `check_shapes` annotation, what `N` and `D` are.
Complications would be:
- Currently
check_shapes
can be disabled. How do we reshape stuff if we don't learn the shapes of stuff, because shape checking is disabled? Maybe we need a flag to pass tocheck_shapes
to force it enabled? - Currently
check_shapes
only do best-effort shape checking. For example it doesn't check compiled TensorFlow code. Again, what do we do if an object has "unknown" shape?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request