jieyibi / AMDKD

The implementation code of our paper "Learning Generalizable Models for Vehicle Routing Problems via Knowledge Distillation", accepted at NeurIPS2022.
MIT License
47 stars 10 forks source link

About model train question #2

Closed oooo111 closed 1 year ago

oooo111 commented 1 year ago

About May I ask how to solve a large number of Inf problems in both student_logp and teacher_logp during model training?

jieyibi commented 1 year ago

Hi, you can add a very small value (e.g. 0.00001) to the probabilities before calculating logP (i.e. _studentlogp and _teacherlogp) to avoid the occurrence of log0 and to accordingly solve the Inf issue. We have updated our code. Please check it.