Olivier Breuleux
Olivier Breuleux
@abergeron That would work in relatively trivial cases, but it's pretty brittle, I think. Take this case, for example: ```python def f(a, i): y = a[i] a[i] = 33 return...
Regarding HOF and rewriting, one approach would be to indiscriminately modify the return value of *every* function to return the new value of each parameter. For example, ```python a =...
Hmm, my idea won't work, because it assumes parameters are not aliased at the beginning. If the body of `f(x, y)` modifies `x`, but it turns out `y` contains `x`,...
> If a free variable is undefined, it must be defined exactly once after its capture. If a variable is defined, it cannot be redefined after its capture. I would...
> My suggestion would be to optimize, then closure convert, then AD, then optimize again, then closure convert again. Presumably the first optimization pass would have exploited any optimization opportunities...
Actually, I suppose an explicit closure could be typed as `(e, e -> a -> b)`, but it does require `e` to be a type variable in several situations.
Yeah, I see what you mean, and the gradient transform's certainly going to be simpler if it doesn't need all the special machinery to deal with free variables. This being...
Hi dj, The indent in your code blocks got messed up when you copy/pasted it, it looks like. The first error is due to the fact the bprop function is...
Sorry for the late reply, I was on holidays. 1. Specialize will create a distinct copy of every graph for every type signature it can have, so that every node...
Here is my opening suggestion for how to do it. Don't hesitate to criticize it :) ## Code organization ``` milatools torch datasets class CachedDataset class Split ... ImageFolder =...