
Aug. 5, 2020
5:13 a.m.
05.08.20 10:36, redradist@gmail.com пише:
Decorator will do the same thing as general decorator
So the code class Neuron: @linear_activation activation would be equivalent to the following code? class Neuron: activation activation = linear_activation(activation) This code does not work unless you define global name "activation", and if define it, the code can be written as class Neuron: activation = linear_activation(activation) I do not see reasons to introduce special syntax for this very specific code.