{"action":"created","issue":{"url":"https://api.github.com/repos/maxpumperla/hyperas/issues/57","repository_url":"https://api.github.com/repos/maxpumperla/hyperas","labels_url":"https://api.github.com/repos/maxpumperla/hyperas/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/maxpumperla/hyperas/issues/57/comments","events_url":"https://api.github.com/repos/maxpumperla/hyperas/issues/57/events","html_url":"https://github.com/maxpumperla/hyperas/issues/57","id":194777475,"number":57,"title":"object of type 'NoneType' has no len()","user":{"login":"jdelange","id":12218726,"avatar_url":"https://avatars.githubusercontent.com/u/12218726?v=3","gravatar_id":"","url":"https://api.github.com/users/jdelange","html_url":"https://github.com/jdelange","followers_url":"https://api.github.com/users/jdelange/followers","following_url":"https://api.github.com/users/jdelange/following{/other_user}","gists_url":"https://api.github.com/users/jdelange/gists{/gist_id}","starred_url":"https://api.github.com/users/jdelange/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdelange/subscriptions","organizations_url":"https://api.github.com/users/jdelange/orgs","repos_url":"https://api.github.com/users/jdelange/repos","events_url":"https://api.github.com/users/jdelange/events{/privacy}","received_events_url":"https://api.github.com/users/jdelange/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-10T16:28:59Z","updated_at":"2016-12-10T16:55:35Z","closed_at":null,"body":"First time try with Hyperas. I get an error: **object of type 'NoneType' has no len()** at `trials=Trials() `in the `optim.minimize(...)` call. Not sure what this means. I am trying to optimize a network that takes three inputs in the form of a list X_train[], so X_train[0] has a set of input data, X_train[1] and X_train_[2] also.  Not sure if that could be the cause for this error? Don't know what Hyperas can handle.\r\n\r\nHere's some code:\r\n\r\n```\r\ndef data(): \r\n    # load VGG16 output data, X_train and X_valid are lists with data channels\r\n    X_train, Y_train, X_valid, Y_valid = load_VGG16_output(data_type='train', num_channels=3)\r\n    return X_train, Y_train, X_valid, Y_valid\r\n```\r\n```\r\ndef model(X_train, Y_train, X_valid, Y_valid):\r\n\r\n    in_0 = Input(shape=X_train[0].shape[1:])    \r\n    x = Dense(256, activation='relu')(in_0)\r\n    x = Dropout(0.5)(x)\r\n\r\n    in_1 = Input(shape=X_train[1].shape[1:])\r\n    y = Dense(64, activation='relu')(in_1) #, W_regularizer=l2(0.01))(in_1)\r\n    y = Dropout(0.5)(y)\r\n\r\n    in_2 = Input(X_train[2].shape[1:])\r\n    z = Dense(32, activation='relu')(in_2) #, W_regularizer=l2(0.01))(in_2)\r\n    z = Dropout(0.5)(z)\r\n\r\n    x = merge([x, y, z], mode='concat', concat_axis=1)\r\n    \r\n    predict = Dense(1, activation='sigmoid')(x)\r\n    model = Model(input=[in_0, in_1, in_2], output=predict)\r\n   \r\n    optimizer=Adam(lr=1e-4, decay=0.003)\r\n\r\n    model.compile(loss='binary_crossentropy', optimizer=optimizer, metrics=['accuracy'])\r\n\r\n    # load the class weight to balance the input positive / negative scores\r\n    class_weight = load_class_weight()\r\n\r\n    model.fit(X_train, Y_train,\r\n              batch_size={{choice([32, 64, 128])}}, # optimize batch size\r\n              nb_epoch=1, \r\n              verbose=2, \r\n              class_weight=class_weight,\r\n              validation_data=(X_valid, Y_valid))\r\n\r\n    score, acc = model.evaluate(X_valid, Y_valid, verbose=0)\r\n    print('Valid accuracy: ', acc)\r\n    return {'loss': -acc, 'status': STATUS_OK, 'model': model}\r\n```\r\n```\r\nif __name__ == '__main__':\r\n    \r\n    X_train, Y_train, X_valid, Y_valid = data()\r\n\r\n    best_run, best_model = optim.minimize(model=model,\r\n                                          data=data,\r\n                                          algo=tpe.suggest,\r\n                                          max_evals=5,\r\n                                          trials=Trials())\r\n       \r\n    print('Evalutation of best performing model: ')\r\n    print(best_model.evaluate(X_valid, Y_valid))\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/maxpumperla/hyperas/issues/comments/266222159","html_url":"https://github.com/maxpumperla/hyperas/issues/57#issuecomment-266222159","issue_url":"https://api.github.com/repos/maxpumperla/hyperas/issues/57","id":266222159,"user":{"login":"maxpumperla","id":3462566,"avatar_url":"https://avatars.githubusercontent.com/u/3462566?v=3","gravatar_id":"","url":"https://api.github.com/users/maxpumperla","html_url":"https://github.com/maxpumperla","followers_url":"https://api.github.com/users/maxpumperla/followers","following_url":"https://api.github.com/users/maxpumperla/following{/other_user}","gists_url":"https://api.github.com/users/maxpumperla/gists{/gist_id}","starred_url":"https://api.github.com/users/maxpumperla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxpumperla/subscriptions","organizations_url":"https://api.github.com/users/maxpumperla/orgs","repos_url":"https://api.github.com/users/maxpumperla/repos","events_url":"https://api.github.com/users/maxpumperla/events{/privacy}","received_events_url":"https://api.github.com/users/maxpumperla/received_events","type":"User","site_admin":false},"created_at":"2016-12-10T16:55:35Z","updated_at":"2016-12-10T16:55:35Z","body":"@jdelange could you please provide the full stack trace?"}}
{"actor":{"display_login":"maxpumperla"}}