-
- Evaluate Expression
调试过程中,需要查看比如attn_weight 张量tensor的值。
- Evaluate Expression
-
- 方法一:
attn_weight.detach().numpy()
,view as array
- 方法一:
-
- 方法二:
attn_weight.cpu().numpy()
,view as array
- 方法二:
attn_weight.detach().numpy()
,view as arrayattn_weight.cpu().numpy()
,view as array