-
[pytorch] grad 확인하는 방법Framework/PyTorch 2024. 10. 15. 03:59
for name, param in model.named_parameters(): if param.grad is not None: print(f"check grad, {name} grad: {param.grad}")
모듈 layer 출력
for name, layer in model.named_modules(): print(name, layer)