Skip to content
Advertisement

Tag: tensorflow

Debugging tensorflow fit not making sense

So I was having different results with a self-implemented code and Tensorflow results. I wanted to test each value to see where was my error (loss, gradients, optimizer, etc). Therefore I did a test code like the one in this repo inspired on the fashion mnist example. Just for simplicity I will copy-paste it at the end of the question.

how to use more three channels input in train_datagen

I am trying to apply Keras for images with more than three spectral channels. I noticed that train_datagen handles images with three channels based on color_mode=’rgb’. Is there any way to increase the number input channels or are there any alternative methods? Answer You can have 1, 3 or 4 channels. See the docs. color_mode One of “grayscale”, “rgb”, “rgba”.

Tensorflow Keras evaluate method return a empty list

Hello i am follow the time series forecasting tutorial in tensorflow https://www.tensorflow.org/tutorials/structured_data/time_series, I have the same project, the only difference is that I am using a different dataset, when evaluating the models, the model.evaluate () method returns an empty list, it does not return a value. When the model is trained with the fit() method, evaluation values are generated in

How to convert tensor from 2D to 4D

I’m currently working with DICOM files and the TensorFlow IO library for DICOM files seems to throw some errors. So what I was originally doing was this: Anyways, I instead decided to load the DICOM files with pydicom, which seems to work loading the data into a numpy array. Yet, when I create a tensor from the data, I can’t

tensorflow: InvalidArgumentError while find the AUC score

I have a dataset with labels 0’s and 1’s, which is binary classification problem. Getting error while try to find AUC score using tf.keras.metrics.AUC() as metrics in model.compile(.. function. Code: If I removed AUC from metrics, the code runs fine. Error: InvalidArgumentError: assertion failed: [predictions must be >= 0] [Condition x >= y did not hold element-wise:] [x (sequential_48/dense_293/BiasAdd:0) =

How to Calculate Confusion Matrix on test Data?

I want to plot a confusion matrix on the validation data. Specifically, I want to calculate a confusion matrix of the model output on the validation data. I tried everything online, but couldn’t figure it out. here is my model: Answer Here is a dummy example. DataSet Model Confusion Matrix Your interest is mostly here. Visualization Let’s visualize. Update Based

Advertisement