When i run the code to train the model, the first epoch time is gives this error :

Could you post a minimal and executable code snippet to reproduce the error as well as the output of python -m torch.utils.collect_env, please?

You can post code snippets by wrapping them into three backticks ```, which makes debugging easier.