tutorials.examples.train_chip_design

Attributes

parser

Classes

ChipDesignPreprocessor

Base class for state preprocessors.

Functions

main(args)

Module Contents

class tutorials.examples.train_chip_design.ChipDesignPreprocessor(env, embedding_dim=64)

Bases: gfn.preprocessors.Preprocessor

Base class for state preprocessors.

Preprocessors transform raw state tensors into formats suitable for neural network inputs. They handle the conversion from environment-specific state representations to standardized tensor formats that can be processed by neural networks.

output_dim

The dimensionality of the preprocessed output tensor, which is compatible with the neural network that will be used. If None, the output dimension will not be checked.

embedding
embedding_dim = 64
n_macros
preprocess(states)

Transforms the states to the input format for neural networks.

Parameters:

states – The states to preprocess.

Returns:

A tensor of shape (*batch_shape, output_dim) containing the preprocessed states.

tutorials.examples.train_chip_design.main(args)
tutorials.examples.train_chip_design.parser