用法:
class torch.nn.ReflectionPad3d(padding)
使用输入边界的反射填充输入张量。
对于
N
维填充,请使用torch.nn.functional.pad()
- 形状:
输入: 或 。
输出: 或 ,其中
例子:
>>> m = nn.ReflectionPad3d(1) >>> input = torch.arange(8, dtype=torch.float).reshape(1, 1, 2, 2, 2) >>> m(input) tensor([[[[[7., 6., 7., 6.], [5., 4., 5., 4.], [7., 6., 7., 6.], [5., 4., 5., 4.]], [[3., 2., 3., 2.], [1., 0., 1., 0.], [3., 2., 3., 2.], [1., 0., 1., 0.]], [[7., 6., 7., 6.], [5., 4., 5., 4.], [7., 6., 7., 6.], [5., 4., 5., 4.]], [[3., 2., 3., 2.], [1., 0., 1., 0.], [3., 2., 3., 2.], [1., 0., 1., 0.]]]]])
相关用法
- Python torch.nn.ReflectionPad1d用法及代码示例
- Python torch.nn.ReflectionPad2d用法及代码示例
- Python torch.nn.ReplicationPad2d用法及代码示例
- Python torch.nn.ReLU用法及代码示例
- Python torch.nn.ReplicationPad1d用法及代码示例
- Python torch.nn.ReLU6用法及代码示例
- Python torch.nn.ReplicationPad3d用法及代码示例
- Python torch.nn.RReLU用法及代码示例
- Python torch.nn.RNNCell用法及代码示例
- Python torch.nn.RNN用法及代码示例
- Python torch.nn.InstanceNorm3d用法及代码示例
- Python torch.nn.quantized.dynamic.LSTM用法及代码示例
- Python torch.nn.EmbeddingBag用法及代码示例
- Python torch.nn.Module.register_forward_hook用法及代码示例
- Python torch.nn.AvgPool2d用法及代码示例
- Python torch.nn.PixelShuffle用法及代码示例
- Python torch.nn.CELU用法及代码示例
- Python torch.nn.Hardsigmoid用法及代码示例
- Python torch.nn.GLU用法及代码示例
- Python torch.nn.functional.conv1d用法及代码示例
- Python torch.nn.Identity用法及代码示例
- Python torch.nn.Sigmoid用法及代码示例
- Python torch.nn.utils.spectral_norm用法及代码示例
- Python torch.nn.utils.prune.custom_from_mask用法及代码示例
- Python torch.nn.MaxUnpool3d用法及代码示例
注:本文由纯净天空筛选整理自pytorch.org大神的英文原创作品 torch.nn.ReflectionPad3d。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。