本文簡要介紹python語言中 torch.histc
的用法。
用法:
torch.histc(input, bins=100, min=0, max=0, *, out=None) → Tensor
out(Tensor,可選的) -輸出張量。
直方圖表示為張量
計算張量的直方圖。
元素被分類到
min
和max
之間等寬的 bin 中。如果min
和max
都為零,則使用數據的最小值和最大值。低於 min 和高於 max 的元素將被忽略。
例子:
>>> torch.histc(torch.tensor([1., 2, 1]), bins=4, min=0, max=3) tensor([ 0., 2., 1., 0.])
參數:
關鍵字參數:
返回:
返回類型:
相關用法
- Python PyTorch histogram用法及代碼示例
- Python PyTorch help用法及代碼示例
- Python PyTorch hessian用法及代碼示例
- Python PyTorch hsplit用法及代碼示例
- Python PyTorch hfft用法及代碼示例
- Python PyTorch hstack用法及代碼示例
- Python PyTorch hypot用法及代碼示例
- Python PyTorch heaviside用法及代碼示例
- Python PyTorch householder_product用法及代碼示例
- Python PyTorch handle_torch_function用法及代碼示例
- Python PyTorch hvp用法及代碼示例
- Python PyTorch frexp用法及代碼示例
- Python PyTorch jvp用法及代碼示例
- Python PyTorch cholesky用法及代碼示例
- Python PyTorch vdot用法及代碼示例
- Python PyTorch ELU用法及代碼示例
- Python PyTorch ScaledDotProduct.__init__用法及代碼示例
- Python PyTorch gumbel_softmax用法及代碼示例
- Python PyTorch get_tokenizer用法及代碼示例
- Python PyTorch saved_tensors_hooks用法及代碼示例
- Python PyTorch positive用法及代碼示例
- Python PyTorch renorm用法及代碼示例
- Python PyTorch AvgPool2d用法及代碼示例
- Python PyTorch MaxUnpool3d用法及代碼示例
- Python PyTorch Bernoulli用法及代碼示例
注:本文由純淨天空篩選整理自pytorch.org大神的英文原創作品 torch.histc。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。