Skip to content

Commit

Permalink
Merge pull request experiencor#123 from mrshu/mrshu/get_anchors-fix
Browse files Browse the repository at this point in the history
update: Fix gen_anchors.py
  • Loading branch information
experiencor committed Jan 11, 2018
2 parents a3e3e92 + c78ed7f commit 9b0ef52
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions gen_anchors.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,7 @@ def run_kmeans(ann_dims, anchor_num):
for i in range(ann_num):
centroid_sums[assignments[i]]+=ann_dims[i]
for j in range(anchor_num):
<<<<<<< HEAD
centroids[j] = centroid_sums[j]/(np.sum(assignments==j) + 1e-6)
=======
centroids[j] = centroid_sums[j]/(np.sum(assignments==j))
>>>>>>> 4843db4a6c199941d8e4e57bdd86af7d33882c61

prev_assignments = assignments.copy()
old_distances = distances.copy()
Expand Down Expand Up @@ -138,4 +134,4 @@ def main(argv):

if __name__ == '__main__':
args = argparser.parse_args()
main(args)
main(args)

0 comments on commit 9b0ef52

Please sign in to comment.