Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there some reasons why you used data.anchor_set? #11

Open
SeongJinAhn opened this issue Jan 23, 2020 · 0 comments
Open

Is there some reasons why you used data.anchor_set? #11

SeongJinAhn opened this issue Jan 23, 2020 · 0 comments

Comments

@SeongJinAhn
Copy link

In utils.py, preselect_anchor is implemented as following.

def preselect_anchor(data, layer_num=1, anchor_num=32, anchor_size_num=4, device='cpu'):
data.anchor_size_num = anchor_size_num
data.anchor_set = []
anchor_num_per_size = anchor_num//anchor_size_num
for i in range(anchor_size_num):
anchor_size = 2**(i+1)-1
anchors = np.random.choice(data.num_nodes, size=(layer_num,anchor_num_per_size,anchor_size), replace=True)
data.anchor_set.append(anchors)
data.anchor_set_indicator = np.zeros((layer_num, anchor_num, data.num_nodes), dtype=int)

anchorset_id = get_random_anchorset(data.num_nodes,c=1)
data.dists_max, data.dists_argmax = get_dist_max(anchorset_id, data.dists, device)

These but other code uses data.dists_max, dists_argmax , so anchorset_id is used to make them.
But data.anchor_set are not used in other codes..

Do you have reasons you implemented them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant