Method: TorchVision::Models::Bottleneck#forward
- Defined in:
- lib/torchvision/models/bottleneck.rb
#forward(x) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/torchvision/models/bottleneck.rb', line 20 def forward(x) identity = x out = @conv1.call(x) out = @bn1.call(out) out = @relu.call(out) out = @conv2.call(out) out = @bn2.call(out) out = @relu.call(out) out = @conv3.call(out) out = @bn3.call(out) identity = @downsample.call(x) if @downsample out += identity out = @relu.call(out) out end |