Dynamically Setting out_dim Based on LightningDataModule in LightningCLI #20602
-
Dynamically Setting
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You have two options:
|
Beta Was this translation helpful? Give feedback.
You have two options:
setup
method so that if it is called multiple time, only the first run does the required logic. Then change thenum_of_labels
property so that it callssetup
before accessing the_num_of_labels
attribute.data
instance (instead of an attribute of it) and acompute_fn
that first runssetup
and then accesses thenum_of_labels
property.