INNER CODE UNIT · Python
hidden2output_layer
nv-tlabs/ATISS · scene_synthesis/networks/__init__.py:25
def hidden2output_layer(config, n_classes):
config_n = config["network"]
hidden2output_layer = config_n.get("hidden2output_layer")
if hidden2output_layer == "autoregressive_mlc":
return AutoregressiveDMLL(
config_n.get("hidden_dims", 768),
n_classes,
config_n.get("n_mixtures", 4),
get_bbox_output(config_n.get("bbox_output", "autoregressive_mlc")),
config_n.get("with_extra_fc", False),
)
else:
raise NotImplementedError()
def optimizer_factory(config, parameters):
"""Based on the provided config create the suitable optimizer."""