Open xuewyang opened 4 years ago
Yes. If you don't want mixed precision training with apex, in the config file, just set apex_opt_level
to None
.
Note that this will double the memory required in your GPU, so you might want to half the batch_size
and instances_per_epoch
in the config.
Thank you.
Hey Alasda, I have a follow up question regarding apex. I try to retrain the model with my customized setting, but I always encounter a configuration error which says:
raise ConfigurationError("You specified an apex_opt_level, but we could not import apex. ")
I followed the instruction to install apex from the README. The weird thing is if I run
from apex import amp
right after I install the apex following the instruction, it has no problem. But Once I start training, and it comes to this configuration checkpoint, it will always say that apex cannot be imported. I wonder if you have any general idea on why this happens? Thanks!
Can you run conda list | grep apex
? If it doesn't return anything, it means your apex installation has failed. If you scroll up a bit on the apex installation log, you probably can see where it failed.
I think the reason why from apex import amp
works is because you run python inside the apex repo, and Python just imports the apex
in the working directory directly.
Hi, Can we run the code without using apex?