@@ -367,32 +367,29 @@ def __init__(self, config):
367367 self .projection = None
368368 if config .add_projection :
369369 self .projection = nn .Conv2d (256 , 256 , kernel_size = (3 , 3 ), stride = (1 , 1 ), padding = (1 , 1 ))
370- self .projection_act = nn .ReLU ()
371370
372371 features = config .fusion_hidden_size
373372 self .conv1 = nn .Conv2d (features , features // 2 , kernel_size = 3 , stride = 1 , padding = 1 )
374373 self .upsample = nn .Upsample (scale_factor = 2 , mode = "bilinear" , align_corners = True )
375374 self .conv2 = nn .Conv2d (features // 2 , config .num_relative_features , kernel_size = 3 , stride = 1 , padding = 1 )
376- self .conv2_act = nn .ReLU ()
377375 self .conv3 = nn .Conv2d (config .num_relative_features , 1 , kernel_size = 1 , stride = 1 , padding = 0 )
378- self .conv3_act = nn .ReLU ()
379376
380377 def forward (self , hidden_states : List [torch .Tensor ]) -> torch .Tensor :
381378 # use last features
382379 hidden_states = hidden_states [self .head_in_index ]
383380
384381 if self .projection is not None :
385382 hidden_states = self .projection (hidden_states )
386- hidden_states = self . projection_act (hidden_states )
383+ hidden_states = nn . ReLU () (hidden_states )
387384
388385 hidden_states = self .conv1 (hidden_states )
389386 hidden_states = self .upsample (hidden_states )
390387 hidden_states = self .conv2 (hidden_states )
391- hidden_states = self . conv2_act (hidden_states )
388+ hidden_states = nn . ReLU () (hidden_states )
392389 # we need the features here (after second conv + ReLu)
393390 features = hidden_states
394391 hidden_states = self .conv3 (hidden_states )
395- hidden_states = self . conv3_act (hidden_states )
392+ hidden_states = nn . ReLU () (hidden_states )
396393
397394 predicted_depth = hidden_states .squeeze (dim = 1 )
398395
0 commit comments