case 1 training and inference .. middle of code audit ...