We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
为什么训练了多个epoch,结果没有变化,和训练一轮一样
The text was updated successfully, but these errors were encountered:
可能之前framework/framework.py里面我限制了:
if epoch == 0: eval_start_time = time.time() model.eval() # call the test function precision, recall, f1_score = self.test(test_data_loader, model, current_f1=best_f1_score, output=self.config.result_save_name) self.logging('epoch {:3d}, eval time: {:5.2f}s, f1: {:4.3f}, precision: {:4.3f}, recall: {:4.3f}'. format(epoch, time.time() - eval_start_time, f1_score, precision, recall)) if f1_score > best_f1_score: best_f1_score = f1_score best_epoch = epoch best_precision = precision best_recall = recall self.logging("saving the model, epoch: {:3d}, precision: {:4.3f}, recall: {:4.3f}, best f1: {:4.3f}". format(best_epoch, best_precision, best_recall, best_f1_score)) # save the best model path = os.path.join(self.config.checkpoint_dir, self.config.model_save_name) if not self.config.debug: torch.save(ori_model.state_dict(), path) model.train()
你可以把这里改一下。
Sorry, something went wrong.
No branches or pull requests
为什么训练了多个epoch,结果没有变化,和训练一轮一样
The text was updated successfully, but these errors were encountered: