nilesh2797/DEXML

Clarifications on the use of the trained model

Closed this issue · 2 comments

Hi @nilesh2797 ,

Thanks for the great work on the DEXML model!

I have a few questions about using the code. I have trained the model on my dataset. From the logs during training, the model looks promising.

Q1: A folder with my model name appears in Results. There is a file val_metrics.tsv. Is that where the metrics from training the model on the train dataset are stored? Or was the test dataset used for validation?

Q2: The second question comes from the first one - how can I correctly use the model.pt file from Results? I tried to get results using the "Run DEXML" block example from dexml.ipynb, but nothing worked.

Thanks in advance!

Hey Dmitriy,

Thanks for your interest in DEXML!

A1. val_metrics.tsv stores the validation metrics, by default validation set is same as the test set but this can be changed by setting num_val_points variable greater than 0 in the config file (which will then sample num_val_points datapoints from the training dataset and make that your validation set).

A2. Right, the demo example is for loading pre-trained checkpoints from huggingface, to load a model.pt file you can simply load it like this:

net = TFEncoder(args)
net.load(f'{OUT_DIR}/model.pt')

I hope this answers your question, let me know if there are other questions, happy to answer. Also if possible keep me posted if the method performs as expected on your dataset.

Best, Nilesh

Hi Nilesh,

Thanks a lot for the explanation, everything works!