th.mean
和th.nanmean
都是计算tensor的均值,不同的时候后者会在计算之前剔除掉所有的nan
. 但是这导致th.nanmean
的复杂度提高
%timeit th.mean(th.ones(widith, height), dim=-1)
(illustrating pseudo code)
Last update :
February 13, 2023
Created : February 13, 2023
Created : February 13, 2023