Functions
Get to know how function attributes can be created and look at the final version of your StepByStep class.
We'll cover the following...
Creating function attributes
For convenience, sometimes it is useful to create attributes that are functions, which will be called somewhere else inside the class. In our case, we can create both train_step
and val_step
by using the higher-order functions we defined in the chapter, Rethinking the Training Loop (helper functions ...