aimclub / StableGNN

Framework for autonomous learning of explainable graph neural networks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement appropriate model/embeddings saving with high order flags.

danwhale opened this issue · comments

embeddings_name = (
            "../data_validation/"
            + self.data_name
            + "/processed/"
            + "embeddings_"
            + self.data_name
            + "_"
            + self.loss_name
            + ".npy"
        )
        if os.path.exists(embeddings_name):
            emb = np.load(embeddings_name)
            return emb
                embeddings_name,
                out.detach().cpu().numpy(),
            )
            return out.detach().cpu().numpy()
          ```

structural_neighbourhood

 if os.path.exists(
            "../data_validation/"
            + self.data_name
            + "/processed"
            + "/structural_neighbourhood_"
            + self.data_name
            + ".npy"
        ):
            new_edge_index = np.load(
                "../data_validation/"
                + self.data_name
                + "/processed"
                + "/structural_neighbourhood_"
                + self.data_name
                + ".npy"
            )
    ```
    
    np.save(
            "../data_validation/"
            + self.data_name
            + "/processed"
            + "/structural_neighbourhood_"
            + self.data_name
            + ".npy",
            np.array(new_edge_index),
        )