How many episodes does it take to get peak performance?
Closed this issue · 2 comments
MegaYEye commented
Hello!
Just curious do I have to go through all 200 training episodes to get the reproduced metric? It seems like each epoch will take half an hour for me.
Besides, may I know why the chamfer distance used in training is divided by 2?
Thanks for your help!
def chamfer_distance_numpy(array1, array2):
batch_size, num_point, num_features = array1.shape
dist = 0
for i in range(batch_size):
av_dist1 = array2samples_distance(array1[i], array2[i])
av_dist2 = array2samples_distance(array2[i], array1[i])
dist = dist + (0.5*av_dist1+0.5*av_dist2)/batch_size # why the chamfer distance used in training is divided by 2
return dist*100
def chamfer_distance_numpy_test(array1, array2):
batch_size, num_point, num_features = array1.shape
dist_all = 0
dist1 = 0
dist2 = 0
for i in range(batch_size):
av_dist1 = array2samples_distance(array1[i], array2[i])
av_dist2 = array2samples_distance(array2[i], array1[i])
dist_all = dist_all + (av_dist1+av_dist2)/batch_size
dist1 = dist1+av_dist1/batch_size
dist2 = dist2+av_dist2/batch_size
return dist_all, dist1, dist2
zztianzz commented
Hi, If you just want to test the code, 100 training episodes are enough. Actually, the complete code is distx0.5x100 = distx50. This is to control the ratio of CD and Adversarial Loss. It is not an important point. You can ignore it.
MegaYEye commented
That makes sense to me. Thanks again!