upload files
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"train": {
|
||||
"log_interval": 100,
|
||||
"eval_interval": 200,
|
||||
"eval_interval": 1000,
|
||||
"seed": 1234,
|
||||
"epochs": 10000,
|
||||
"learning_rate": 2e-4,
|
||||
|
||||
+2
-2
@@ -243,14 +243,14 @@ def train_and_evaluate(rank, epoch, hps, nets, optims, schedulers, scaler, loade
|
||||
utils.save_checkpoint(net_g, None, hps.train.learning_rate, epoch,
|
||||
os.path.join(hps.model_dir, "G_latest.pth".format(global_step)))
|
||||
# utils.save_checkpoint(net_d, optim_d, hps.train.learning_rate, epoch, os.path.join(hps.model_dir, "D_{}.pth".format(global_step)))
|
||||
old_g=os.path.join(hps.model_dir, "G_{}.pth".format(global_step-400))
|
||||
old_g=os.path.join(hps.model_dir, "G_{}.pth".format(global_step-4000))
|
||||
# old_d=os.path.join(hps.model_dir, "D_{}.pth".format(global_step-400))
|
||||
if os.path.exists(old_g):
|
||||
os.remove(old_g)
|
||||
# if os.path.exists(old_d):
|
||||
# os.remove(old_d)
|
||||
global_step += 1
|
||||
if global_step == 4001:
|
||||
if global_step == hps.n_steps + 1:
|
||||
exit()
|
||||
|
||||
if rank == 0:
|
||||
|
||||
@@ -152,6 +152,8 @@ def get_hparams(init=True):
|
||||
help='JSON file for configuration')
|
||||
parser.add_argument('-m', '--model', type=str, default="pretrained_models",
|
||||
help='Model name')
|
||||
parser.add_argument('-n', '--n_steps', type=str, default="2000",
|
||||
help='finetune steps')
|
||||
|
||||
args = parser.parse_args()
|
||||
model_dir = os.path.join("./", args.model)
|
||||
|
||||
Reference in New Issue
Block a user