Skip to content
New issue

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

代码问题 #30

Closed
iamqiz opened this issue Sep 15, 2022 · 2 comments
Closed

代码问题 #30

iamqiz opened this issue Sep 15, 2022 · 2 comments

Comments

@iamqiz
Copy link

iamqiz commented Sep 15, 2022

115 行被注释掉了, 后面inference要用到这个文件

def on_epoch_end(self, global_step, epoch, logs=None):
val_acc = self.evaluate(valid_dataloader)
test_acc = self.evaluate(test_dataloader)
logs['val/acc'] = val_acc
logs['test/acc'] = test_acc
if val_acc > self.best_val_acc:
self.best_val_acc = val_acc
# model.save_weights('best_model.pt')
print(f'val_acc: {val_acc:.5f}, test_acc: {test_acc:.5f}, best_val_acc: {self.best_val_acc:.5f}\n')

@Tongjilibo
Copy link
Owner

好的,不过一般是我不想本地跑代码时候保存太多ckpt所以注释掉的(其他脚本我也注释掉了),真正使用的时候可以自行解开注释

@iamqiz
Copy link
Author

iamqiz commented Sep 15, 2022

inference

有道理😉

@iamqiz iamqiz closed this as completed Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants