Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tensor shape #857

Open
3 tasks done
lars-reimann opened this issue Jun 24, 2024 · 0 comments · May be fixed by #908
Open
3 tasks done

Tensor shape #857

lars-reimann opened this issue Jun 24, 2024 · 0 comments · May be fixed by #908
Assignees
Labels
enhancement 💡 New feature or request lab Suitable for the lab

Comments

@lars-reimann
Copy link
Member

lars-reimann commented Jun 24, 2024

Is your feature request related to a problem?

Layer.input_size and Layer.output_size currently return int | ModelImageSize. A user must first type check the result to do anything with it.

Desired solution

  • Add a class TensorShape with
    • Property dimensionality: int. It should contain the number of indices required to access a scalar in the tensor
    • Method get_size(dimension: int) -> int. It should return the number of elements along the given dimension.
      • Raise if dimension < 0 (0-based indexing) - use _check_bounds.
      • Return 0 if dimension >= dimensionality.
  • Make the existing ModelImageSize a subclass of TensorShape.
  • Adjust Layer.input_size and Layer.output_size to return a TensorShape instead.

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

No response

@lars-reimann lars-reimann added enhancement 💡 New feature or request lab Suitable for the lab labels Jun 24, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Library Jun 24, 2024
@timwirt timwirt moved this from Backlog to In Progress in Library Jun 28, 2024
@timwirt timwirt moved this from In Progress to Backlog in Library Jun 28, 2024
@LIEeOoNn LIEeOoNn moved this from Backlog to In Progress in Library Jul 12, 2024
@LIEeOoNn LIEeOoNn linked a pull request Jul 12, 2024 that will close this issue
@LIEeOoNn LIEeOoNn linked a pull request Jul 12, 2024 that will close this issue
@lars-reimann lars-reimann moved this from In Progress to Backlog in Library Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 💡 New feature or request lab Suitable for the lab
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

6 participants