Create gaussian_decoder model specified by gaussian_decoder_name.
(
params: GaussianDecoderParams, dims_depth_features: list[int]
)
| 23 | |
| 24 | |
| 25 | def create_gaussian_decoder( |
| 26 | params: GaussianDecoderParams, dims_depth_features: list[int] |
| 27 | ) -> GaussianDensePredictionTransformer: |
| 28 | """Create gaussian_decoder model specified by gaussian_decoder_name.""" |
| 29 | decoder = MultiresConvDecoder( |
| 30 | dims_depth_features, |
| 31 | params.dims_decoder, |
| 32 | grad_checkpointing=params.grad_checkpointing, |
| 33 | upsampling_mode=params.upsampling_mode, |
| 34 | ) |
| 35 | |
| 36 | return GaussianDensePredictionTransformer( |
| 37 | decoder=decoder, |
| 38 | dim_in=params.dim_in, |
| 39 | dim_out=params.dim_out, |
| 40 | stride_out=params.stride, |
| 41 | norm_type=params.norm_type, |
| 42 | norm_num_groups=params.norm_num_groups, |
| 43 | use_depth_input=params.use_depth_input, |
| 44 | grad_checkpointing=params.grad_checkpointing, |
| 45 | image_encoder_type=params.image_encoder_type, |
| 46 | image_encoder_params=params, |
| 47 | ) |
| 48 | |
| 49 | |
| 50 | def _create_project_upsample_block( |
no test coverage detected