Skip to content

Add TensorError enum and Tensor struct with basic implementation#8

Merged
CodeVoyager15 merged 2 commits into
mainfrom
7-rktensor
Sep 13, 2025
Merged

Add TensorError enum and Tensor struct with basic implementation#8
CodeVoyager15 merged 2 commits into
mainfrom
7-rktensor

Conversation

@CodeVoyager15
Copy link
Copy Markdown
Owner

Summary

  • Introduced TensorError enum to handle tensor-related errors, including ShapeMismatch, InvalidType, UnsafeOperation, and a generic Other variant.
  • Implemented fmt::Display and Error traits for TensorError to provide user-friendly error messages.
  • Added a Tensor struct with data and shape fields to represent a tensor.
  • Created a new method for the Tensor struct to initialize tensors with error handling.

}

#[test]
fn imagenet_normalization_math_1x1() {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't remove this test case.

@CodeVoyager15 CodeVoyager15 merged commit a7eb3ce into main Sep 13, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants