nvalchemi.models.gen.demo.DemoGANModel#

class nvalchemi.models.gen.demo.DemoGANModel(num_atoms=3, latent_dim=4, hidden=32)[source]#

Minimal GAN-side demo: a latent draw decoded to a point cloud.

The generative analogue of DemoModel — a placeholder for testing and debugging generative workflows. forward follows the mixin convention (forward(data, *, x)) and decodes the latent x to flat positions.

Parameters:
  • num_atoms (int)

  • latent_dim (int)

  • hidden (int)

decode(z)[source]#

Decode latent z to positions of shape (B, num_atoms, 3).

Parameters:

z (Tensor)

Return type:

Tensor

extra_repr()#

Format the generative config for nn.Module.__repr__.

Parameters:

self (Any) – The wrapper instance (injected onto concrete subclasses).

Returns:

A short summary of the declared batch-field contracts.

Return type:

str

forward(data, *, x, **kwargs)[source]#

Decode a latent draw x of shape (B, latent_dim).

Parameters:
  • data (Any)

  • x (Tensor)

  • kwargs (Any)

Return type:

Tensor

to_batch(sample, cond_batch=None)[source]#

Materialize the sample: one point-cloud graph per draw.

Parameters:
  • sample (TensorDict)

  • cond_batch (Batch | None)

Return type:

Batch