I_H_Yoo:


For softmax, and if you aren’t building a Sequential , I’d use the functional interface.

Why would you do that? What’s the beneficial of using functional interface instead of Module?


I think about modules as holding state (e.g. weights, as you mention) and using that and the inputs I pass to produce the output. So for softmax, using the functional interface expresses how I think about it (i.e. as a function of the inputs and no weights etc.).
But don’t make it a science, just go with what you prefer.