update audduio2pose v1.0
This commit is contained in:
1 parent
c2797657f8
commit
3a15011f4d
28 files changed
+1817
-483
No files matched your search
@@ -14,7 +14,6 @@ from src.config import config as opt
|
||||
from src.config import update_config
|
||||
from src.losses.metrics import MeanDictMetric
|
||||
|
||||
|
||||
# from common.vis.visualizer import Visualizer
|
||||
from torch.utils.tensorboard import SummaryWriter
|
||||
|
||||
@@ -109,9 +108,12 @@ if __name__ == "__main__":
|
||||
|
||||
# update learning_rate
|
||||
train_metric.reset()
|
||||
if opt.TRAIN.apply_update_parameters:
|
||||
model.update_parameters(epoch)
|
||||
|
||||
for i, ibatch_data in enumerate(train_loader):
|
||||
|
||||
train_loss_dict = model.training(ibatch_data) # forward and backward
|
||||
train_loss_dict = model.training(ibatch_data, epoch, i) # forward and backward
|
||||
train_metric.update(train_loss_dict)
|
||||
|
||||
# print logger
|
||||
@@ -146,14 +148,12 @@ if __name__ == "__main__":
|
||||
|
||||
################ upate learning rate by validataion
|
||||
model.update_learning_rate(valid_loss_dict["all"])
|
||||
if opt.TRAIN.apply_update_parameters:
|
||||
model.update_parameters(epoch)
|
||||
|
||||
################# testing
|
||||
if opt.TRAIN.apply_testing and (epoch+1) % opt.FREQ.epoch_test == 0:
|
||||
logger.info("Test...")
|
||||
for _, ibatch_test in enumerate(test_loader):
|
||||
model.testing(batch_input=ibatch_test, cur_epoch=epoch) # forward and backward
|
||||
model.testing(batch_input=ibatch_test, idx_epoch=epoch) # forward and backward
|
||||
break
|
||||
|
||||
################# save epoch
|
||||
|
||||
Reference in new issue
Block a user