cannot import name 'conditional' from 'hyperas.distributions'
See original GitHub issuei use other people’s code:
from __future__ import print_function
from hyperopt import Trials, STATUS_OK, tpe
from keras.datasets import mnist
from keras.layers.core import Dense, Dropout, Activation
from keras.models import Sequential
from keras.utils import np_utils
from hyperas import optim
from hyperas.distributions import choice, uniform, conditional
and error occured:
Traceback (most recent call last):
File "<ipython-input-1-77a51f029857>", line 10, in <module>
from hyperas.distributions import choice, uniform, conditional
ImportError: cannot import name 'conditional' from 'hyperas.distributions' (C:\Users\peter\Anaconda3\lib\site-packages\hyperas\distributions.py)
i tryed:
pip uninstall hyperas
pip install git+https://github.com/maxpumperla/hyperas.git
pip uninstall hyperopt
pip install git+https://github.com/hyperopt/hyperopt.git
but the problem is still there.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
报错解决:cannot import name 'conditional' from 'hyperas ...
早上在使用hyperas时报错如下:In[5]: from hyperas.distributions import conditionalTraceback (most recent call last): File ...
Read more >Invalid agrument error using hyperas in keras - Stack Overflow
the name of my notebook is keras_glioma_hyperopt. Still running into errors but it could be in my set up with my code.
Read more >Hyperas by maxpumperla
Hyperas lets you use the power of hyperopt without having to learn the syntax of it. ... from hyperas.distributions import uniform model =...
Read more >A guide to an efficient way to build neural network architectures
A guide to an efficient way to build neural network architectures- Part I: Hyper-parameter selection and tuning for Dense Networks using Hyperas on...
Read more >Keras + Hyperopt: Convenient Hyperparameter Optimization
from hyperas.distributions import uniform def create_model(x_train, y_train, ... That fails simply because python cannot run the templating in the braces, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
conditional
is definitely gone from master and the last release (if I remember correctly). You can get rid of the error by removing all the conditional calls from “other people’s code”. 😄is there any solution/alternative for conditional? I have basically the same code snippet that @ljakupi has posted for optimizing the number of layers of the trained network. However, since
conditional
was dropped, I’m wondering how to realize this pipeline (i.e. optimizing for number of layers)