8000 some problem for code · Issue #20 · chaoshangcs/GTS · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
some problem for code #20
Open
Open
@perveil

Description

@perveil
def encode_onehot(labels):
    classes = set(labels)
    classes_dict = {c: np.identity(len(classes))[i, :] for i, c in
                    enumerate(classes)}
    labels_onehot = np.array(list(map(classes_dict.get, labels)),
                             dtype=np.int32)
    return labels_onehot
off_diag = np.ones([self.num_nodes, self.num_nodes])
rel_rec = np.array(encode_onehot(np.where(off_diag)[0]), dtype=np.float32) #?
rel_send = np.array(encode_onehot(np.where(off_diag)[1]), dtype=np.float32) #?
self.rel_rec = torch.FloatTensor(rel_rec).to(device)
self.rel_send = torch.FloatTensor(rel_send).to(device)

hi!I have some questions with the above code,so rel_rec 、rel_send `s mean is what?
Thank you for your reply!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0