I’m training a ResNet type architecture and I have to input a class ResidualBlock
as an argument to the model. However, when I run the training code, wandb changes the class ResidualBlock
to a str "ResidualBlock"
so I can’t access the class variable. How can I make wandb recognize ResidualBlock
as a class and not a str?
A simplified version of my config looks like the following
config = {
"batch_size": 16,
"epochs": 500,
"lr": 0.005,
"model_params": dict(
in_channels=1,
block=ResidualBlock,
cfg=[2,2,2],
num_classes=10
)
}
A simplified version of my training code looks like the following
with wandb.init(config=config):
config = wandb.config
train(config)