def uniform_weights(n_sample):
"""Return uniform weights (almost for debug).
EXAMPLE
-------
>>> weights = uniform_weights(3)
>>> print(weights)
<BLANKLINE>
0.3333
0.3333
0.3333
[torch.FloatTensor of size 3]
<BLANKLINE>
:return:
"""
weights = torch.ones(n_sample)
return weights / weights.sum()
评论列表
文章目录