if (FALSE) {
cifar <- dataset_cifar10()
hypermodel = HyperResNet(input_shape = list(32L, 32L, 3L), classes = 10L)
hypermodel2 = HyperXception(input_shape = list(32L, 32L, 3L), classes = 10L)
tuner = Hyperband(
hypermodel = hypermodel,
objective = 'accuracy',
loss = 'sparse_categorical_crossentropy',
max_epochs = 1,
directory = 'my_dir',
project_name='helloworld')
train_data = cifar$train$x[1:30,1:32,1:32,1:3]
test_data = cifar$train$y[1:30,1] %>% as.matrix()
tuner %>% fit_tuner(train_data,test_data, epochs = 1)
}
Run the code above in your browser using DataLab