Closed Ha0Tang closed 3 years ago
We use train_data.npy as our only data source. We dynamically select samples for evaluation depending on the target graph size, e.g. if target size is 10-12, then we train on graphs of size [1-9; 13+] and test on graphs of size [10-12], here.
train_data.npy is the exactly the same dataset we used for the paper. housegan_clean_data.npy is another version, where we included a mapping from our vector samples to original RGB images from LIFULL dataset. Both datasets should work.
Thanks for your quick response. I am now meeting the following error when running python variation_bbs_with_target_graph_segments_suppl.py
Namespace(batch_size=1, channels=1, exp_folder='exp', latent_dim=128, n_cpu=16, num_variations=4) 5000 target samples: defaultdict(<class 'int'>, {10: 1960, 11: 1799, 12: 1241}) /data0/htang/anaconda3/envs/env/lib/python3.6/site-packages/pygraphviz/agraph.py:1341: RuntimeWarning: Warning: b is not a known color.
warnings.warn(b"".join(errors).decode(self.encoding), RuntimeWarning) Traceback (most recent call last): File "variation_bbs_with_target_graph_segments_suppl.py", line 225, in
graph_arr = draw_graph([real_nodes, eds.detach().cpu().numpy()]) File "variation_bbs_with_target_graph_segments_suppl.py", line 75, in draw_graph nx.draw(G_true, pos, node_size=1000, node_color=colors_H, font_size=0, font_weight='bold', edges=edges, edge_color=colors, width=weights) File "/data0/htang/anaconda3/env/env/lib/python3.6/site-packages/networkx/drawing/nx_pylab.py", line 123, in draw draw_networkx(G, pos=pos, ax=ax, **kwds) File "/data0/htang/anaconda3/env/env/lib/python3.6/site-packages/networkx/drawing/nx_pylab.py", line 326, in draw_networkx raise ValueError(f"Received invalid argument(s): {invalid_args}") ValueError: Received invalid argument(s): edges
Any ideas?
Moreover, when should I use valida_data.npy
?
valid_data.npy is just some additional data that we ended up never using. You could add it as extra training data or ignore it.
The error is probably due to the version of the networkx library you are using. We used networkx == 2.4. I would recommend downgrading it or simply deleting the edges arguments, when rendering the graphs for visualization.
Thank you so much!!!
@ennauata what the single output _true_graph.jpg
in the folder dump
means?
@Ha0Tang, that's just a folder that I use for temporally saving graph images for constructing the final grid image.
why the evaluation stage also uses
train_data.npy
as shown in this line?what the difference between
train_data.npy
andhousegan_clean_data.npy
? Thanks.