Open zhxnlp opened 2 years ago
欢迎您反馈PaddleHub使用问题,非常感谢您对PaddleHub的贡献! 在留下您的问题时,辛苦您同步提供如下信息:
import paddlehub as hub model = hub.Module(name="resnet50_vd_imagenet_ssld", label_list=['0','1'])
import paddle from paddlehub.finetune.trainer import Trainer
optimizer = paddle.optimizer.Adam(learning_rate=0.001, parameters=model.parameters()) trainer = Trainer(model, optimizer, checkpoint_dir='resnetv2_50') trainer.train(train_ds, epochs=1, batch_size=32, eval_dataset=valid_ds, save_interval=1)
运行后训练时日志打印正常,验证集明显不对,每次验证,‘Evaluation on validation dataset’重复打印520+次,导致日志很难看loss等信息。(验证集dataset长度200左右)
你好,问题的原因已经找到了,当初在执行验证集eval的时候,做了个打印Evaluation on validation dataset的等待动画,正常应该是会打印在同一行,但是在aistudio上打印不生效,我们看下如何优化。
欢迎您反馈PaddleHub使用问题,非常感谢您对PaddleHub的贡献! 在留下您的问题时,辛苦您同步提供如下信息:
import paddlehub as hub model = hub.Module(name="resnet50_vd_imagenet_ssld", label_list=['0','1'])
import paddle from paddlehub.finetune.trainer import Trainer
optimizer = paddle.optimizer.Adam(learning_rate=0.001, parameters=model.parameters()) trainer = Trainer(model, optimizer, checkpoint_dir='resnetv2_50') trainer.train(train_ds, epochs=1, batch_size=32, eval_dataset=valid_ds, save_interval=1)
运行后训练时日志打印正常,验证集明显不对,每次验证,‘Evaluation on validation dataset’重复打印520+次,导致日志很难看loss等信息。(验证集dataset长度200左右)