# Generating node embedding from GAE, VGAE or DGI.

Note that due the large size of ogbn-products, we use GraphSAINT as encoder (with subgraph sampling).

For GAE, run:

python GAE_ogb.py \
	--linear {If use single GNN layer as encoder, enter 1. If use two layers, enter 0} \
	--save_name {Enter the name of saved embedding.} \
	--input_feature_path {Enter the path to node features if you want to use your pretrained one. For using ogb default one, enter None}


The result will be saved at './GAE_embedding/Lin_{}-Var_False-input_{save_name}.pt'. {} is True or False depends on linear is 1 or 0.

For VGAE, run:

python GAE_ogb.py \
	--variational 1 \
	--linear {If use single GNN layer as encoder, enter 1. If use two layers, enter 0} \
	--save_name {Enter the name of saved embedding.} \
	--input_feature_path {Enter the path to node features if you want to use your pretrained one. For using ogb default one, enter None} 

The result will be saved at './GAE_embedding/Lin_{}-Var_True-input_{save_name}.pt'. {} is True or False depends on linear is 1 or 0.

For DGI, run:

python DGI_ogb.py \
	--save_name {Enter the name of saved embedding.} \
	--input_feature_path {Enter the path to node features if you want to use your pretrained one. For using ogb default one, enter None}

The result will be saved at './DGI_embedding/input_{save_name}.pt'.