code: def __init__(
      self,
      pretrained=True,
      layers=None,
      activation=ACT_RELU,
      first_conv_stride_one: bool = False,
      **kwargs,
  ):
      from timm.models.resnet import resnet50d
  
      act_layer = get_activation_block(activation)
      encoder = resnet50d(
          features_only=True,
          pretrained=pretrained,
          act_layer=act_layer,
          **kwargs,
      )
      if first_conv_stride_one:
          encoder.conv1[0].stride = (1, 1)
          for info in encoder.feature_info:
              info["reduction"] = info["reduction"] // 2
  
      super().__init__(encoder, layers)
  
imports: from collections import OrderedDict
  from typing import List
  import torch
  from torch import nn
  from .common import GenericTimmEncoder
  from ..common import EncoderModule, make_n_channel_input
  from ...None import ACT_RELU, get_activation_block
label_desc: Use image node_id 1 to create a new TimmResnet50D object from inherited base classes: GenericTimmEncoder with example: obj = TimmResnet50D(pretrained, layers, activation, first_conv_stride_one)