sadiyea
sadiyea

Reputation: 23

TypeError: 'module' object is not callable error?

I studying on a model training. when i called the training function i got this error "TypeError: 'module' object is not callable" and i can't see where i missed it.

here is my calling function:

train(
            model,
            optimizer,
            loss,
            train_loader,
            hyperparams["epoch"],
            scheduler=hyperparams["scheduler"],
            device=hyperparams["device"],
            val_loader=val_loader,
           

) the error i got

Upvotes: 2

Views: 9945

Answers (1)

Shai
Shai

Reputation: 114796

You are calling tqdm module, instead of tqdm method from tqdm module.

Replace:

import tqdm

with:

from tqdm import tqdm

Upvotes: 6

Related Questions