hyperas icon indicating copy to clipboard operation
hyperas copied to clipboard

Possibility to Use Object Method

Open pvmilk opened this issue 7 years ago • 1 comments

I would like to use object method in the model and data arguments of optim.minimize().

optim.minimize(model=model,
                          data=data,
                          ...);

I tried to modify your example code (as attached hyperras.txt), and got the following error.

    def create_model(self, x_train, y_train, x_test, y_test):
    ^
IndentationError: unexpected indent

P.S. Just in case somebody would ask why I want to do this. My source code has a way to create model and trained differently. The source code attached is probably a simplified version of what I meant to use with hyperas. Once this issue is solve, I plan to replace self.create_model and self.data to call my classes.

pvmilk avatar Mar 07 '18 05:03 pvmilk

sorry, that simply isn't possible right now. you get the indent error precisely because if your wrapper

maxpumperla avatar Mar 07 '18 07:03 maxpumperla