niklasnolte / MonotonicNetworks

MIT License
35 stars 8 forks source link

one-inf possible bug? #7

Closed ctargon closed 7 months ago

ctargon commented 7 months ago

in get_normed_weights, should the one-inf option be:

norms = weights.abs().max()

? It seems to me that, according to the paper's definition of one-inf matrix norm, the one-inf norm would only be correct if vectorwise=False. However, in the examples notebook "one-inf" is used when vectorwise=True.

niklasnolte commented 7 months ago

vectorwise for one-inf should really be called elementwise..

so, for elementwise=True, we would like each element to be unrestricted until it hits the bound. For weight.abs().max(), everything would be divided by the max, thus smaller elements are also affected.

does that track with your understanding?

ctargon commented 7 months ago

that makes sense. thanks for the help!