Comments (7)
Could you install from master and see what happens (at least you should get a different error message then):
pip install git+https://github.com/autonomio/talos.git
Also can you post your model code for reference.
from talos.
@Jakedismo just to clarify, this is a known issue and is addressed in the version of Talos that @mikkokotila posted. Basically there was a catch-all statement that spit out the error message you're seeing regardless of the error.
If what you posted above is the model function you're trying to import to Talos, it won't work because the arguments are not in the right format.
Also, in a more recent version of Talos (on the Master
branch) you can manually specify the validation and training sets independently if you want.
Does this help at all?
from talos.
def DAE_CF(x_train, y_train, x_val, y_val, params):
#model = Model()
user_input = Input((train_x.shape[1],), name='user_input')
#model.add(user_input)
h_user = Dropout(1)(user_input)
#model.add(h_user)
#h_item = Embedding(input_dim=I, output_dim=K, input_length=1, W_regularizer=l2(l))(item_input)
encoded = Dense(50, W_regularizer=l2(params['lr']), b_regularizer=l2(params['lr']))(h_user)
#model.add(encoded)
item_input = Input((1,), dtype='int32', name='item_input')
#model.add(item_input)
h_item = Embedding(input_dim=len(y_train), output_dim=50, input_length=1, W_regularizer=l2(params['lr']))(item_input)
#model.add(h_item)
decoded = Flatten()(h_item)
#model.add(decoded)
h = merge([encoded, decoded], mode='sum')
if hidden_activation:
h = Activation(params['hidden_activation'])(h)
y = Dense(train_x.shape[1], activation=params['output_activation'])(h)
#model.add(y)
model = Model(input=[user_input, item_input], output=y)
#model.add(autoencoder)
encoder = Model(user_input, encoded)
encoded_input = Input((50,), name='encoded_input')
decoder_layer = autoencoder.layers[-1]
decoder = Model(encoded_input, decoder_layer(encoded_input))
model.compile(loss=params['loss'], optimizer=params['optimizer'], metrics=[metrics.rmse, 'accuracy'])
history = autoencoder.fit(x=x_train, y=y_train,
batch_size=batch_size, epochs=n_epochs, verbose=1,
validation_data=[x_val, y_val])
return history, model
from talos.
Same problem here. I have not a Sequential model, but a Model(), a Model has not got a predict_classes(). I;m using Keras 2.2.0
File "/usr/local/lib/python3.5/dist-packages/talos/scan/Scan.py", line 142, in init
self._null = self.runtime()
File "/usr/local/lib/python3.5/dist-packages/talos/scan/Scan.py", line 147, in runtime
self = scan_run(self)
File "/usr/local/lib/python3.5/dist-packages/talos/scan/scan_run.py", line 29, in scan_run
self = rounds_run(self)
File "/usr/local/lib/python3.5/dist-packages/talos/scan/scan_run.py", line 61, in rounds_run
self._val_score = get_score(self)
File "/usr/local/lib/python3.5/dist-packages/talos/metrics/score_model.py", line 17, in get_score
y_pred = self.keras_model.predict_classes(self.x_val)
AttributeError: 'Model' object has no attribute 'predict_classes'
from talos.
@timvhamme, I found a solution for this problem: modify the score_model.py file as follows
from .performance import Performance
def get_score(self):
#y_pred = self.keras_model.predict_classes(self.x_val) # not supported by Model()
y_prob = self.keras_model.predict(self.x_val) # supported by Model()
y_pred = y_prob.argmax(axis=-1) # return the class
return Performance(y_pred, self.y_val, self.shape, self.y_max).result
from talos.
This is related with #39, #42 and #64. It looks like in #64 we've just agreed to add this fix as a parameter into Talos. Should have it pushed to dev over the next few days. The way it will work is to to use:
experimental_functional_support=True
...in Scan()
from talos.
This is now fixed in the current dev branch.
from talos.
Related Issues (20)
- Key duplication results in exception: param dict vs. csv file stored (e.g., 'loss') HOT 3
- Heatmap always have missing parts HOT 2
- Failed to build scipy while installing talos HOT 1
- Using `Evaluate` with multiple inputs HOT 6
- ImportError: cannot import name 'get_config' HOT 4
- add arguments to the function syntax HOT 1
- Using train, val data HOT 1
- Cannot replicate typical example from documentation HOT 1
- Can't find description of layer shapes HOT 3
- Talos installation stuck at downloading statsmodel HOT 1
- [RFC00102] Increase Visibility and Access to Power Draw Data HOT 1
- Getting errors when handling custom object HOT 4
- Add comprehensive support for n-dimensional `x` or `y`
- AttributeError: module 'talos.utils' has no attribute 'ExperimentLogCallback' HOT 1
- Live is not in talos HOT 1
- Advanced hyperparameter configuration HOT 1
- Error with Autom8 import HOT 1
- pip install talos is failing due to sklearn in requirements.txt instead of scikit-learn HOT 4
- Will talos support Maximal Update Parametrization later? HOT 1
- batch_size not support list HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from talos.