Lornatang / SRGAN-PyTorch

A simple and complete implementation of super-resolution paper.
Apache License 2.0
410 stars 105 forks source link

AttributeError: module 'config' has no attribute 'feature_model_extractor_node' #58

Closed zjgt closed 2 years ago

zjgt commented 2 years ago

Hi, I just tried this and ran into a problem. The error seems to refer to the config file: feature_model_extractor_node = "features.35" #line 87 in the config file. Do I miss something in my package? Thanks!

(srgan) D:\SRGAN-PyTorch-main>python train_srgan.py Load all datasets successfully. Build SRGAN model successfully. Traceback (most recent call last): File "D:\SRGAN-PyTorch-main\train_srgan.py", line 581, in main() File "D:\SRGAN-PyTorch-main\train_srgan.py", line 48, in main content_criterion, adversarial_criterion = define_loss() File "D:\SRGAN-PyTorch-main\train_srgan.py", line 255, in define_loss content_criterion = ContentLoss(config.feature_model_extractor_node, AttributeError: module 'config' has no attribute 'feature_model_extractor_node'

Lornatang commented 2 years ago

If you train SRGAN network, you should change config.py 33 line.

# mode = "train_srresnet"
mode = "train_srgan"