There seem to be several threads/issues on this already but it doesn't appear to me that this has been solved:
How can I use tensorflow metric function within keras…
I am trying to freeze the free trained VGG16's layers ('conv_base' below) and add new layers on top of them for feature extracting.
I expect to get same prediction results from 'conv_base' before(ret1) / after(ret2) fit of model but it is not.
Is…
I have been working on my project Deep Learning Language Detection which is a network with these layers to recognise from 16 programming languages:
And this is the code to produce the network:
# Setting up the model
graph_in =…
I'm trying to build a model as ilustrated in below diagram. The idea is to take more than one categorical features (one-hot vectors) and embed them separately, then combine those embedded vectors with a 3D tensor for a LSTM.
With following code in…
I am doing some task related to image captioning and I have loaded the weights of inception model like this
model = InceptionV3(weights='imagenet')
But I am getting error like this:
AttributeError: module 'tensorflow' has no attribute…
I tried to execute some project. But I've got an attribute error.
I checked my Tensorflow and Keras version.
Name: tensorflow
Version: 2.3.1
Name: Keras
Version: 2.4.3
Summary: Deep Learning for humans
python 3.8.2
The code is…
I am working on a comparison of the fitting accuracy results for the different types of data quality. A "good data" is the data without any NA in the feature values. A "bad data" is the data with NA in the feature values. A "bad data" should be…
The Keras documentation for the dot/Dot layer states that:
"Layer that computes a dot product between samples in two tensors.
E.g. if applied to a list of two tensors a and b of shape (batch_size, n), the output will be a tensor of shape …
I'm trying to implement Attention mechanism in order to produce abstractive text summarization using Keras by taking a lot of help from this GitHub thread where there is a lot of informative discussion about the implementation. I'm struggling to…
I'd like to know the specificity and sensitivity of my model. Currently, I'm evaluating the model after all epochs are finished:
from sklearn.metrics import confusion_matrix
predictions = model.predict(x_test)
y_test = np.argmax(y_test,…
I am using Keras 2.0.0 with Theano.
I would like to update the training data between each epoch. I can do it in a for loop using nb_epochs=1 but it would be much more elegant using the on_epoch_end callback.
Here is my tentative code, based on a…
Following the upgrade to Keras 2.0.9, I have been using the multi_gpu_model utility but I can't save my models or best weights using
model.save('path')
The error I get is
TypeError: can’t pickle module objects
I suspect there is some problem…
I want to initialize a 4*11 matrix using glorot uniform in Keras, using following code:
import keras
keras.initializers.glorot_uniform((4,11))
I get this output :
How can I visualize the…
I am having an issue. I run the same code on my local machine with CPU and Tensorflow 1.14.0. It works fine. However, when I run it on GPU with Tensorflow 2.0, I get
CancelledError: [_Derived_]RecvAsync is cancelled. [[{{node…
Keras 2.0 removed F1 score, but I would like to monitor its value. I am using a sequential model to train a Neural Net.
I defined a function, as suggested here How to calculate F1 Macro in Keras?.
This function works fine only if used it inside…