([*rand_pad(...)], []), why need to wrap rand_pad with [ ]?

I am watching the lecture #7.

In the lecture there is a statement
tfms = ([*rand_pad(padding=3, size=28, mode='zeros')], [])

The result seems identical with
tfms = (rand_pad(padding=3, size=28, mode='zeros'), [])

What is the difference, and why do * and [ ... ] are needed here?

1 Like
  • return rando padding and cropping. Empty array [ ] is for validation set. No transform for validation set

I agree, no particular reason, except to make it more obvious on how to use it. The first one makes it more obvious that you are just passing an array. This is a teaching resource after all.