Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #set training data:
- x_train <- as.matrix(Daten[1:5300,3:ncol(Daten)])
- #set model:
- model <- keras_model_sequential()
- model %>%
- layer_dense(units = 5, activation = "tanh",
- input_shape = ncol(x_train), name = "bottleneck")%>%
- layer_dense(units = ncol(x_train))
- #compile model:
- model %>% compile(loss= "mean_squared_error", optimizer = "adam",
- metrics = c("accuracy"))
- #train model:
- model %>% fit(x=x_train, y= x_train, epochs = 50, batch_size=32, verbose
- = 1)
- #show the weights of the model:
- weights <- get_weights(model)
- print(weights)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement