How can I train my own optix denoise model and pass into optix?

There exists an interface optixDenoiserCreateWithUserModel that can takes a user model in optix denoiser. But how can I train my model and in which data type can I pass it into optix? (Pytorch .bin file or Tensorflow .tf file or other types?)