original_docstring: Add an output head for models predicting "clip-level outputs".
docstring: Add an output head for models predicting "clip-level outputs".
docstring_tokens: Add an output head for models predicting " clip - level outputs " .
code: def add_basic_head(model, blob_in, dim_in, pool_stride, out_spatial_dim,
               suffix, lfb_infer_only, test_mode):
      """Add an output head for models predicting "clip-level outputs"."""
  
      # -> (B, 2048, 1, 1, 1)
      pooled = model.AveragePool(
          blob_in, blob_in + '_pooled',
          kernels=[pool_stride, out_spatial_dim, out_spatial_dim],
          strides=[1, 1, 1], pads=[0, 0, 0] * 2)
  
      all_heads = [pooled]
      new_dim_in = [dim_in]
  
      if cfg.LFB.ENABLED and not lfb_infer_only:
  
          fbo_out, fbo_out_dim = lfb_helper.add_fbo_head(
              model, pooled, dim_in,
              num_lfb_feat=cfg.LFB.WINDOW_SIZE,
              test_mode=test_mode, suffix=suffix)
  
          all_heads.append(fbo_out)
          new_dim_in.append(fbo_out_dim)
  
      return (model.net.Concat(all_heads,
                               ['pool5', 'pool5_concat_info'],
                               axis=1)[0],
              sum(new_dim_in))
code_tokens: def add_basic_head ( model , blob_in , dim_in , pool_stride , out_spatial_dim , suffix , lfb_infer_only , test_mode ) : pooled = model . AveragePool ( blob_in , blob_in + '_pooled' , kernels = [ pool_stride , out_spatial_dim , out_spatial_dim ] , strides = [ 1 , 1 , 1 ] , pads = [ 0 , 0 , 0 ] * 2 ) all_heads = [ pooled ] new_dim_in = [ dim_in ] if cfg . LFB . ENABLED and not lfb_infer_only : fbo_out , fbo_out_dim = lfb_helper . add_fbo_head ( model , pooled , dim_in , num_lfb_feat = cfg . LFB . WINDOW_SIZE , test_mode = test_mode , suffix = suffix ) all_heads . append ( fbo_out ) new_dim_in . append ( fbo_out_dim ) return ( model . net . Concat ( all_heads , [ 'pool5' , 'pool5_concat_info' ] , axis = 1 ) [ 0 ] , sum ( new_dim_in ) )
short_docstring: Add an output head for models predicting "clip-level outputs".
short_docstring_tokens: Add an output head for models predicting " clip - level outputs " .
comment: """Add an output head for models predicting "clip-level outputs"."""$SEP$# -> (B, 2048, 1, 1, 1)