-
PyTorch exp()
PyTorch - torch.exp[1] torch.exp(torch.tensor([1, 2, 3], [4, 5, 6])) # tensor([e^1, e^2, e^3], [e^4, e^5, e^6]) explain Returns a new tensor with the exponential of the elements of the input tensor input. 입력 텐서인 input의 각 요소를 자연 상수를 밑으로 하는 exponential(지수)로서 변환합니다. \[y_{i} = e^{x_{i}}\] Parameters input: torch.Ten... Read More
-
PyTorch div()
PyTorch - torch.div[1] x = torch.tensor([ 0.3810, 1.2774, -0.2972, -0.3719, 0.4637]) torch.div(x, 0.5) # tensor([ 0.7620, 2.5548, -0.5944, -0.7438, 0.9274]) a = torch.tensor([[-0.3711, -1.9353, -0.4605, -0.2917], ... [ 0.1815, -1.0111, 0.9805, -1.5923], ... [ 0.1062, 1.4581, 0.7759, -1.2344], ... ... Read More
-
PyTorch bmm()
PyTorch - torch.bmm[1] input = torch.randn(10, 3, 4) mat2 = torch.randn(10, 4, 5) res = torch.bmm(input, mat2) res.size() # torch.Size([10, 3, 5]) explain Performs a batch matrix-matrix product of matrices stored in input and mat2. Input과 mat2에 저장된 행렬의 batch matrix-matrix 곱셈을 수행한다. input and mat2 must be 3-D tensors e... Read More
-
Torchvision make_grid()
Pytorch - torchvision.utils.make_grid[1] torchvision.utils.make_grid( tensor: Union[Tensor, List[Tensor]], nrow: int = 8, padding: int = 2, normalize: bool = False, value_range: Optional[Tuple[int, int]] = None, scale_each: bool = False, pad_value: float = 0.0, **kwargs ) -> Tensor tensor (Tensor o... Read More
-
PyTorch pow()
PyTorch - torch.pow[1] a = torch.randn(4) # tensor([ 0.4331, 1.2475, 0.6834, -0.2791]) torch.pow(a, 2) # tensor([ 0.1875, 1.5561, 0.4670, 0.0779]) exp = torch.arange(1., 5.) # tensor([ 1., 2., 3., 4.]) a = torch.arange(1., 5.) # tensor([ 1., 2., 3., 4.]) torch.pow(a, exp) # tensor([ 1., 4., 27., 256.]) explain Takes th... Read More
-
Instance Normalization: The Missing Ingredient for Fast Stylization
Normalization Literature List Instance Normalization: The Missing Ingredient for Fast Stylization https://arxiv.org/abs/1607.08022 Read More
-
PyTorch ReflectionPad2d()
PyTorch - torch.nn.ReflectionPad2d[1] torch.nn.ReflectionPad2d( padding: Tuple[int, int, int, int] # Tuple[left, right, top, bottom] ) m = torch.nn.ReflectionPad2d(2) input = torch.arange(9, dtype=torch.float).reshape(1, 1, 3, 3) print(input) print(m(input)) ''' tensor([[[[0., 1., 2.], [3., 4., 5.], [6., 7., 8.]]]]) ... Read More