TikTok interview question

code cross entropy loss function.