Hi,
it looks like the issue is that you want to load an MDTrajectory object, but in the nlread() statement you specify a Trajectory object.
It will probably work if you instead use the following line:
# Load another Trajectory object with precalculated data.
trajectory_training_data_input = nlread('KPF6_MD_trajectory_300K_0.1GPa.hdf5', MDTrajectory)[0]
If there is only one object in your file, then you don't need to specify the trajectory type at all.
Hope this fixes it!