2

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

3
  • I think you need to add your valid and train loaders please to be easily debugged. Commented Feb 28, 2022 at 21:00
  • @Phoenix it has nothing to do with the loader Commented Feb 28, 2022 at 21:20
  • please do not post screenshots of logs/stack traces/code. Instead copy-paste the relevant text and format it properly Commented Feb 28, 2022 at 21:22

1 Answer 1

6

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

Replace:

import tqdm

with:

from tqdm import tqdm
Sign up to request clarification or add additional context in comments.

2 Comments

had similar issue with glom
had similar issue with glob

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.