2 ms·
>I always give the rule of thumb "avoid operations on individual elements, but things operating on hundreds+ elements should be fine". And the reason isn't as m
by ChrisRackauckas 5y ago
>I always give the rule of thumb "avoid operations on individual elements, but things operating on hundreds+ elements should be fine". And the reason isn't as much just "Python is slow" but the overhead of the tensor objects.
That's just not possible in a lot of cases, like when defining a large nonlinear ODE which is precisely described by the actions of individual elements. Indeed, it's not the ML case, but it is a case where PyTorch's assumptions are too strong.