New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IndentationError: unexpected indent error in your "complete example" #54
Comments
Yes, that's very unfortunate. Thanks for reporting this. I'll investigate and add this case to the unit tests. |
@maxpumperla I think it is hopefully not a big deal as it worked properly in previous version... |
@ErmiaAzarkhalili fixed on master, was a very silly mistake |
@maxpumperla Thanks, So we can close this issue...(I will open new issue for advanced layers in next days...) |
@maxpumperla Hi Max,
I think there is a serious issue whenever we utilize loops in hyperas. for example in your complete example in the first page of your GitHub repo, I get the following error:
File "", line 39
if conditional({{choice(['three', 'four'])}}) == 'four':
^
IndentationError: unexpected indent
I put the very complete/modified example of your code here:
`
from hyperopt import Trials, STATUS_OK, tpe
from hyperas import optim
from hyperas.distributions import choice, uniform, conditional
from keras.datasets import mnist
from keras.utils import np_utils
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Activation
from keras.layers.normalization import BatchNormalization
from keras.layers.advanced_activations import LeakyReLU, SReLU, PReLU, ThresholdedReLU
def data():
"""
Data providing function:
def model(X_train, Y_train, X_test, Y_test):
"""
Model providing function:
best_run, best_model = optim.minimize(model=model,
data=data,
algo=tpe.suggest,
max_evals=100,
trials=Trials(), notebook_name="simple_notebook")
best_model.save("best_model.h5")
X_train, Y_train, X_test, Y_test = data()
print("Evaluation of best performing model:")
print(best_model.evaluate(X_test, Y_test))
print(best_model.summary())
`
If you run this code, you will get.
File "", line 57
for _ in range(1, conditional({{choice([1, 4, 8, 16])}})):
^
IndentationError: unexpected indent
so, it is serious issue, and I think it's because you might forget special note there... the code work properly in previous versions :(
The text was updated successfully, but these errors were encountered: