MCPcopy Create free account
hub / github.com/apple/ml-sharp / create_gaussian_decoder

Function create_gaussian_decoder

src/sharp/models/gaussian_decoder.py:25–47  ·  view source on GitHub ↗

Create gaussian_decoder model specified by gaussian_decoder_name.

(
    params: GaussianDecoderParams, dims_depth_features: list[int]
)

Source from the content-addressed store, hash-verified

23
24
25def 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
50def _create_project_upsample_block(

Callers 1

create_predictorFunction · 0.85

Tested by

no test coverage detected