Skip to content
Advertisement

Tag: machine-learning

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

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

Input data cannot be a list XGBoost

Here is my code. and the error I’m getting is TypeError: Input data can not be a list. The data coming from test_data is a csv with a team name and obs which is a float like this NYY 0.324 Every way to solve it I’ve seen is just to put it in a 2d array like I did –

I keep getting ValueError: Shapes (10, 1) and (10, 3) are incompatible when training my model

Turning the number of inputs when I call makeModel from 3 to 1 allows the program to run without errors but no training actually happens and the accuracy doesn’t change. Answer LabelEncoder transforms the input to an array of encoded values. i.e if your input is [“paris”, “paris”, “tokyo”, “amsterdam”] then they can be encoded as [0, 0, 1, 2].

Advertisement