Closed ghost closed 2 years ago
Welcome to Talos community! Thanks so much for creating your first issue :)
Hi @shaksham-4176, I ran into this issue as well.
As with many strange Tensorflow errors, this was caused by mixing tensorflow.keras
with keras
.
It appears that talos is using keras
, so replacing all occurences of from tensorflow.keras import ...
with from keras import ...
in your code will probably fix your issue (assuming you have standalone Keras installed).
In Talos 1.0 onwards all imports should be already handled through tf.
Closing this as resolved, feel free to open new issue if anything :)
In Talos 1.0 onwards all imports should be already handled through tf.
Is it already working like this? I am still having the same problem (Talos 1.0, TensorFlow 2.3.1, no standalone Keras) Thanks for the attention.
This is a known issue in an underlying package Astetik.
Will have to fix it there.
This has now been fixed in the underlying dependency. Closing here.
66 ## 1) Confirm the below
Python version - 3.6.9
Tensorflow version - 2.2.0
I've tested my Keras model and it works as a stand-alone
2) Include the output of:
talos.__version__
- 1.0.03) Explain what actually happened
I am trying to perform hyperparameter tuning using the TextCNN model and the IMDB Dataset on Colab. I followed the steps mentioned in one of the example notebooks on how to set up the required parameter space and run talos using the Scan() function.
The problem is when I try to execute the following statement:
t = talos.Scan(x=X_train, y=y_train, model=build_model, params=p, experiment_name='sentiment_analysis', fraction_limit = 0.1)
I am getting the following error message:
AttributeError: 'TrainingLog' object has no attribute '_implements_train_batch_hooks'
5) Provide a code-complete reference
Input model:
Parameter dictionary:
# then we can go ahead and set the parameter space p = {'batch_size': [32, 64], 'epochs': [50, 100], 'kernel_initializer': ['uniform', 'normal', 'glorot_uniform', 'he_normal'], 'optimizer': ['SGD', 'RMSprop', 'Adagrad', 'Adadelta', 'Adam', 'Adamax', 'Nadam'], 'activation':['relu', 'elu'], }
Please help me out with this. Am I doing something wrong? Also, how can I make use of the GPU/TPU facility provided in Colab. When I try to run the code using talos, it is using CPU and not GPU.