mirror of
https://github.com/graphdeco-inria/gaussian-splatting
synced 2025-06-26 18:18:11 +00:00
...
This commit is contained in:
parent
7c6d2ca956
commit
82fbc36df6
11
train.py
11
train.py
@ -31,7 +31,7 @@ except ImportError:
|
||||
def training(dataset, opt, pipe, testing_iterations, saving_iterations, checkpoint_iterations, checkpoint, debug_from):
|
||||
bestLossEncountered = 1000000
|
||||
bestIterationEncountered = 0
|
||||
pickBetweenFinalNLosses = 500 #Closely monitor last 500 solutions
|
||||
goodLossThreshold = 0.07
|
||||
|
||||
first_iter = 0
|
||||
tb_writer = prepare_output_and_logger(dataset)
|
||||
@ -107,13 +107,14 @@ def training(dataset, opt, pipe, testing_iterations, saving_iterations, checkpoi
|
||||
if iteration == opt.iterations:
|
||||
progress_bar.close()
|
||||
|
||||
if (bestLossEncountered>ema_loss_for_log) and (pickBetweenFinalNLosses+iteration > opt.iterations):
|
||||
|
||||
if (bestLossEncountered>ema_loss_for_log) and (goodLossThreshold > ema_loss_for_log):
|
||||
if (bestIterationEncountered!=0):
|
||||
print("\n[ITER {}] Erasing this iteration..".format(bestIterationEncountered))
|
||||
os.system("rm point_cloud/iteration_%u/*.ply && rmdir point_cloud/iteration_%u/"%iteration)
|
||||
print("\n[GOOD ITER {}] Erasing previous best iteration..".format(bestIterationEncountered))
|
||||
os.system("rm point_cloud/iteration_%u/*.ply && rmdir point_cloud/iteration_%u/"%bestIterationEncountered)
|
||||
bestLossEncountered = ema_loss_for_log
|
||||
bestIterationEncountered = iteration
|
||||
print("\n[ITER {}] Now remembering this iteration..".format(iteration))
|
||||
print("\n[GOOD ITER {}] Now remembering this iteration..".format(iteration))
|
||||
saving_iterations.append(iteration)
|
||||
|
||||
# Log and save
|
||||
|
Loading…
Reference in New Issue
Block a user