I was going to draw confusion matrix in my model and I used Transfer learning concept based on Deep Learning model. Confusion Matrix’s code Now below the shape of test_labels and Predictions are given, The above code is perfectly working but I saw error in below. So please concern below code, and here is the error, Note: This is value
Tag: keras
Custom data generator
I have a standard directory structure of train, validation, test, and each contain class subdirectories. I want to use the flow_from_directory API, but all I can find is an ImageDataGenerator, and the files I have are raw numpy arrays (generated with arr.tofile(…)). Is there an easy way to use ImageDataGenerator with a custom file loader? I’m aware of flow_from_dataframe, but
Error while running CNN for 1 dimensional data in R
I am trying to run 1 dimensional CNN in R using keras package. I am trying to create one-dimensional Convolutional Neural Network (CNN) architecture with the following specification But it is giving me following error Error in py_call_impl(callable, dots$args, dots$keywords) : ValueError: Negative dimension size caused by subtracting 4 from 1 for ‘conv1d_20/conv1d’ (op: ‘Conv2D’) with input shapes: [?,1,1,128], [1,4,128,256].
Using pretrained model with keras: AttributeError: ‘NoneType’ object has no attribute ‘shape’
I’m running a Keras Neural Network model for a binary classification of images. I use the first layer of a pretrained VGG16 model and i created the last fully connected layers from the tutorial: https://blog.keras.io/building-powerful-image-classification-models-using-very-little-data.html With Tensorflow backend 2.3.1, Python 3.6, Keras 2.4.3 While i’m training my model (using presaved weights) with an ImageDataGenerator, this exception occurs: That’s my code
Why is my deep learning model predicting very similar but wrong values
So I’ve done some really basic supervised learning in the past and decided to try predictive maintenance and because I am new to this subject I decided to watch some tutorials in the world wide web. After a couple of hours into it i came across this specific tutorial (link down below) in which it is used a dataset from
Why does Keras.preprocessing.sequence pad_sequences process characters instead of words?
I’m working on transcribing speech to text and ran into an issue (I think) when using pad_sequences in Keras. I pretrained a model which used pad_sequences on a dataframe and it fit the data into an array with the same number of columns & rows for each value. However when I used pad_sequences on transcribing text, the number of characters
ValueError: Input 0 of layer sequential is incompatible with the layer: : expected min_ndim=4, found ndim=2. Full shape received: [None, 2584]
I’m working in a project that isolate vocal parts from an audio. I’m using the DSD100 dataset, but for doing tests I’m using the DSD100subset dataset from I only use the mixtures and the vocals. I’m basing this work on this article First I process the audios to extract a spectrogram and put it on a list, with all the
Easiest way to see the output of a hidden layer in Tensorflow/Keras?
I am working on a GAN and I’m trying to diagnose how any why mode collapse occurs. I want to be able to look “under the hood” and see what the outputs of various layers in the network look like for the last minibatch. I saw you can do something like model.layers[5].output, but this produces a tensor of shape [None,
Multiclassification task using keras [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question Classification (not detection!) of several objects in one image is the problem. How can I do this using keras. For
TF.Keras model.predict is slower than straight Numpy?
Thanks, everyone for trying to help me understand the issue below. I have updated the question and produced a CPU-only run and GPU-only of the run. In general, it also appears that in either case a direct numpy calculation hundreds of times faster than the model. predict(). Hopefully, this clarifies that this does not appear to be a CPU vs