“Pytorch”的版本间差异
		
		
		
		
		
		跳到导航
		跳到搜索
		
				
		
		
	
无编辑摘要  | 
				无编辑摘要  | 
				||
| 第7行: | 第7行: | ||
==函数==  | 
  ==函数==  | 
||
*torch.clamp(input, min=None, max=None, *, out=None) → Tensor  | 
  *torch.clamp(input, min=None, max=None, *, out=None) → Tensor  | 
||
:Clamps all elements in input into the range [ min, max ]. Letting min_value and max_value be min and max, respectively  | 
|||
==Tensor==  | 
|||
* cpu() numpy() detach() item() [https://blog.csdn.net/ODIMAYA/article/details/102892799]  | 
|||
:注意cuda上面的变量类型只能是tensor,不能是其他  | 
|||