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

Added strided elewise ops (logistic, tanh). #105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TimDettmers
Copy link

The element-wise operations are performed on the last dimension on a given index. It assumes that tensors are stacked row-wise but that their dimension is increased in the next dimension on the tensor.

For example take 3 stacked 2x2 tensors, which have dimension 2x2x3
[a, a]
[a, a]
[b, b]
[b, b]
[c, c]
[c, c]

The elementwise operation with index 0 will perform operations on a, index 1 on b, index 2 on c. Currently only logistic and tanh are implemented, but other elementwise operations can be added easily.

See the test in the test_handler_operations for examples.

@landscape-bot
Copy link

Code Health
Repository health increased by 0.07% when pulling 5eec5fe on TimDettmers:master into 2d03d14 on IDSIA:master.

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