Obtaining the MLP model from its adjacency matrix

I have treated my Multi-Layer Perceptron (MLP) as a graph and obtained its adjacency matrix (adj_matrix). I have modified the adjacency matrix (adj_modified) and would like to get back the MLP model with the modified weights (from adj_modified). Is there any way to treat the adj_modified matrix as a ‘.pt’ file, so that I can directly load the new weights onto the model?

I am stuck and dont know how to load the new weights. Any other methods to do this would be welcome. Please let me know if the question is unclear in any way