Skip to content

Implement Tensor #1

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

Closed
siliconlad opened this issue Jun 20, 2024 · 4 comments · Fixed by #2
Closed

Implement Tensor #1

siliconlad opened this issue Jun 20, 2024 · 4 comments · Fixed by #2
Assignees
Labels
enhancement New feature or request

Comments

@siliconlad
Copy link
Member

No description provided.

@siliconlad siliconlad added the enhancement New feature or request label Jun 20, 2024
@siliconlad siliconlad self-assigned this Jun 20, 2024
@siliconlad siliconlad linked a pull request Jun 20, 2024 that will close this issue
@CameronMatthew
Copy link
Contributor

CameronMatthew commented Jun 21, 2024

What should a tensor allow:

  • creation from a flat array with a shape
  • creation of identity
  • creation of zeros
  • creation of ones
  • scalar operations
    • multiply
    • add
    • divide
    • subtract
    • power (including fractional power)
    • logical operations (>, <, == etc)
  • element-wise tensor operations (between two tensors of the same shape)
    • multiply
    • add
    • divide
    • subtract
    • power (including fractional)
    • logical operations
  • creation from tile of a smaller tensor
  • slice a sub-tensor from an existing tensor
  • iterate over one axis
  • reduction operations (one axis)
    • sum
    • mean
    • median
    • mode
    • max
    • min
    • stddev
  • collapse operations (e.g. multiply every element in tensor together)
    • sum
    • multiply
  • tensor product

@siliconlad
Copy link
Member Author

Would the logical operators return a Boolean tensor?

@CameronMatthew
Copy link
Contributor

Would the logical operators return a Boolean tensor?

Didn't think about that lol. I guess so. But that seems like an extra type that we just don't need right now. Let's leave those out until we absolutely need them.

@siliconlad
Copy link
Member Author

I suppose you could also have a tensor which has 1's and 0's for true and false respectively. So might not be too difficult to implement, but still. Probably best to wait until we need it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants