def test_grbm_from_config(): vis_layer = layers.BernoulliLayer(num_vis) hid_layer = layers.GaussianLayer(num_hid) grbm = BoltzmannMachine([vis_layer, hid_layer]) config = grbm.get_config() rbm_from_config = BoltzmannMachine.from_config(config) config_from_config = rbm_from_config.get_config() assert config == config_from_config
def test_grbm_config(): vis_layer = layers.BernoulliLayer(num_vis) hid_layer = layers.GaussianLayer(num_hid) grbm = BoltzmannMachine([vis_layer, hid_layer]) grbm.get_config()