MCPcopy Create free account
hub / github.com/openai/shap-e / encode_to_bottleneck

Method encode_to_bottleneck

shap_e/models/transmitter/base.py:61–67  ·  view source on GitHub ↗
(
        self, batch: AttrDict, options: Optional[AttrDict] = None
    )

Source from the content-addressed store, hash-verified

59 return self.bottleneck_to_params(h, options=options)
60
61 def encode_to_bottleneck(
62 self, batch: AttrDict, options: Optional[AttrDict] = None
63 ) -> torch.Tensor:
64 return self.latent_warp.warp(
65 self.latent_bottleneck(self.encode_to_vector(batch, options=options), options=options),
66 options=options,
67 )
68
69 @abstractmethod
70 def encode_to_vector(self, batch: AttrDict, options: Optional[AttrDict] = None) -> torch.Tensor:

Callers 1

forwardMethod · 0.95

Calls 2

encode_to_vectorMethod · 0.95
warpMethod · 0.45

Tested by

no test coverage detected