Open mksamelson opened 1 year ago
P.shape
NameError Traceback (most recent call last) in <cell line: 1>() ----> 1 P.shape
NameError: name 'P' is not defined
P is just a normalization version of N for probability.
You can easily fix it by
P = N.float() P = P / P.sum(1, keepdim=True)
P.shape
NameError Traceback (most recent call last) in <cell line: 1>()
----> 1 P.shape
NameError: name 'P' is not defined