在yolox/core/trainer.py的Trainer类中添加了代码块,但是不起作用
Li-Yidong opened this issue · comments
Li-Yidong commented
def train(self):
self.before_train()
try:
self.train_in_epoch()
except Exception:
raise
finally:
self.after_train()
def train_in_epoch(self):
for self.epoch in range(self.start_epoch, self.max_epoch):
self.before_epoch()
self.train_in_iter()
self.after_epoch()
# 添加剪枝代码
我想在train_in_epoch后面添加剪枝代码来实现剪枝和fine tuning的自动化,但是没有用。train_in_epoch函数里print都不能输出。有人知道这是什么原因吗?