I’m trying to train an LSTM classifier in TensorFlow. Here is a reproducible example Using BinaryAccuracy: Using Accuracy: I have used the ‘Accuracy’ metric for binary classification before, can someone explain why this is happening? Answer The metric is ‘accuracy’, not ‘Ac…
Tag: tensorflow
Problems with importing Tensoflow in Jupyter. DLL load failed. Specific module failed to load
I opened up a Jupyter notebook and tried importing tensorflow as tf and got the following error message And here’s the message I received I tried installing it with the following commands But I’m still getting the same error message. I’m using windows 10 if that helps. Oh I also checked in m…
Predicting in parallel using concurrent.futures of tensorflow.keras models
I am trying to implement some parallel jobs using concurrent.futures. Each worker requires a copy of a TensorFlow model and some data. I implemented it in the following way (MWE) simple_model() creates the model. clone_model clones a TensorFlow model. work represents an MWE of possible work. worker assigns th…
shape of an output tensor after convolutional filter on a colour image
I find it difficult to understand a notion about tensors. For VGG (https://www.tensorflow.org/api_docs/python/tf/keras/applications/VGG16), we start from a batch of colour images (none,224,224,3) and apply 64 2D convolutional filters. At the output we obtain a tensor of (none,224,224,64), we can see this by m…
Keras model.evaluate accuracy stuck at 50 percent while using ImageDataGenerator
I am trying to find the accuracy of my saved Keras model using model.evaluate. I have loaded in my model using this: I have a CSV file with two columns, one for the filename of an image and one for the label. Here is a sample: I have loaded this CSV into a pandas dataframe and fed it into an
The most robust way to work with the specific version of Tensorflow with GPU support
The project I am working on uses the Tensorflow 2.0, which is not the most recent version of this Deep Learning Framework and I would like to enable GPU support. I have already locally installed Tensorflow 2.4.1 for another purposes with CUDA-11.0. This version of Tensorflow sees the GPU on my PC and I can pe…
TypeError: Input ‘y’ of ‘Mul’ Op has type float32 that does not match type int64 of argument ‘x’
after this code i am getting the error in categoricalfocalloss i m not getting whereint64 error is coming model description here in this code , in the loss categoricalfocal loss is used here in the model i used categorical focal loss when i run this ,in train dataset i am not getting how tcovert itintointoint…
Tensorflow Warning every time I import it – ‘cudart64_101.dll not found’. Is there a way to get rid of only this warning?
The execution of the code tends to pause for a while when this occurs. Is there a solution to this? Answer If you’re working with Tensorflow 2.0, setting TF_CPP_MIN_LOG_LEVEL should still work You can disable all logs using os.environ: Here, (The above is tested on TensorFlow 0.12 and 1.0)
why am I getting warning/error when working with tensorflow (use functional API and not implemented error)
I am trying to follow this tutorial but with my data: https://www.tensorflow.org/tutorials/structured_data/feature_columns All of my data is numerical values. when I ran this part of code: I am getting this type of warning for all of the parameters: I am getting this warning twice for each variable! and then …
Tensorflow dataset from numpy array
I have two numpy Arrays (X, Y) which I want to convert to a tensorflow dataset. According to the documentation it should be possible to run When doing this however I get the error: ValueError: Shapes (15, 1) and (768, 15) are incompatible This would make sense if the shapes of the numpy Arrays would be incomp…