def compile(self, optimizer, loss, metrics=None):
if isinstance(optimizer, six.string_types):<EOL><INDENT>optimizer = self.__convert_optim_method(optimizer)<EOL><DEDENT>if isinstance(loss, six.string_types):<EOL><INDENT>loss = self.__convert_criterion(loss)<EOL><DEDENT>if all(isinstance(metric, six.string_types) for metric in metrics):<EOL><INDENT>metrics = self.__convert_metrics(metrics)<EOL><DEDENT>callBigDlFunc(self.bigdl_type, "<STR_LIT>",<EOL>self.value,<EOL>optimizer,<EOL>loss,<EOL>metrics)<EOL>
Configures the learning process. Must be called before fit or evaluate.

# Arguments
optimizer: Optimization method to be used. One can alternatively pass in the corresponding
           string representation, such as 'sgd'.
loss: Criterion to be used. One can alternatively pass in the corresponding string
      representation, such as 'mse'.
metrics: List of validation methods to be used. Default is None. One can alternatively use ['accuracy'].