Error in UseMethod("compute") : no applicable method for 'compute' applied to an object of class "nn"
results <- neuralnet::compute(model2, test_df)
# This can happen when you load the neuralnet package followed
# by another package that contains a compute function
# (like the dplyr package).