“Pytorch”的版本间差异
		
		
		
		
		
		跳到导航
		跳到搜索
		
				
		
		
	
无编辑摘要  | 
				无编辑摘要  | 
				||
| 第12行: | 第12行: | ||
* cpu() numpy() detach() item() [https://blog.csdn.net/ODIMAYA/article/details/102892799]  | 
  * cpu() numpy() detach() item() [https://blog.csdn.net/ODIMAYA/article/details/102892799]  | 
||
:注意cuda上面的变量类型只能是tensor,不能是其他  | 
  :注意cuda上面的变量类型只能是tensor,不能是其他  | 
||
==torchvision==  | 
|||
*PyTorch框架中有一个非常重要且好用的包:torchvision,该包主要由3个子包组成,分别是:torchvision.datasets、torchvision.models、torchvision.transforms。  | 
|||
[https://www.jianshu.com/p/1ae863c1e66d]  | 
|||
2021年10月17日 (日) 05:52的版本
网络初始化
- Xavier and Kaiming initialization [4]
 
函数
- 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() [5]
 
- 注意cuda上面的变量类型只能是tensor,不能是其他
 
torchvision
- PyTorch框架中有一个非常重要且好用的包:torchvision,该包主要由3个子包组成,分别是:torchvision.datasets、torchvision.models、torchvision.transforms。