示例#1
0
    def setUp(self):
        state = np.random.RandomState(0)
        X = generate_dummy_dataset_alltypes(state, N_ROWS, DIM_REG, DIM_BOOL,
                                            DIM_ORD, DIM_CAT).X
        temps = state.random((N_ROWS, 1))

        self.data = X
        self.network = VaeNet(config, dtype=tf.dtypes.float64)
示例#2
0
 def __init__(self, config: VAE.Config, **kwargs):
     tf.keras.Model.__init__(self, **kwargs)
     self.config = config
     self.network = VaeNet(config, **kwargs)
     self.lossnet = VaeLossNet(latent_eps=1e-6, prefix="loss", **kwargs)
     self.weight_getter = Vae.CoolingRegime(config, dtype=self.dtype)
     AutoencoderModelBaseMixin.__init__(
         self,
         self.weight_getter,
         self.network,
         self.config.get_latent_parser_type(),
         self.config.get_fake_output_getter(),
     )
示例#3
0
DIM_X = DIM_REG + DIM_BOOL + sum(DIM_ORD) + sum(DIM_CAT)
EMB_DIM = 10
LAT_DIM = 5
NCATS = 5

desciminatorConfig = DescriminatorNet.Config(embedding_dimensions=[EMB_DIM])

vaeConfig = VaeNet.Config(
    input_dimensions=MultipleObjectiveDimensions(
        regression=DIM_REG,
        boolean=DIM_BOOL,
        ordinal=DIM_ORD,
        categorical=DIM_CAT,
    ),
    output_dimensions=MultipleObjectiveDimensions(
        regression=DIM_REG,
        boolean=DIM_BOOL,
        ordinal=DIM_ORD,
        categorical=DIM_CAT,
    ),
    encoder_embedding_dimensions=[EMB_DIM],
    decoder_embedding_dimensions=[EMB_DIM],
    latent_dim=LAT_DIM,
)

config0 = VaeNet.Config(
    input_dimensions=MultipleObjectiveDimensions(
        regression=DIM_REG,
        boolean=DIM_BOOL,
        ordinal=DIM_ORD,
        categorical=DIM_CAT,