Skip to content
Advertisement

Tag: machine-learning

Keras CNN Error: expected Sequence to have 3 dimensions, but got array with shape (500, 400)

I’m getting this error: ValueError: Error when checking input: expected Sequence to have 3 dimensions, but got array with shape (500, 400) These are the below codes that I’m using. Output (here I’ve 500 rows in each): Code: Any insights? Answer Two things – Conv1D layer expects input to be in the shape (batch_size, x, filters), in your case (500,400,1).

Keras: Adding MDN Layer to LSTM Network

My question in brief: Is the Long Short Term Memory Network detailed below appropriately designed to generate new dance sequences, given dance sequence training data? Context: I am working with a dancer who wishes to use a neural network to generate new dance sequences. She sent me the 2016 chor-rnn paper that accomplished this task using an LSTM network with

Difference between Standard scaler and MinMaxScaler

What is the difference between MinMaxScaler() and StandardScaler(). mms = MinMaxScaler(feature_range = (0, 1)) (Used in a machine learning model) sc = StandardScaler() (In another machine learning model they used standard-scaler and not min-max-scaler) Answer From ScikitLearn site: StandardScaler removes the mean and scales the data to unit variance. However, the outliers have an influence when computing the empirical mean

Mask R-CNN for object detection and segmentation [Train for a custom dataset]

I’m doing a research on “Mask R-CNN for Object Detection and Segmentation”. So I have read the original research paper which presents Mask R-CNN for object detection, and also I found few implementations of Mask R-CNN, here and here (by Facebook AI research team called detectron). But they all have used coco datasets for testing. But I’m quite a bit

Save and load model optimizer state

I have a set of fairly complicated models that I am training and I am looking for a way to save and load the model optimizer states. The “trainer models” consist of different combinations of several other “weight models”, of which some have shared weights, some have frozen weights depending on the trainer, etc. It is a bit too complicated

Python SKLearn: How to Get Feature Names After OneHotEncoder?

I would like to get the feature names of a data set after it has been transformed by SKLearn OneHotEncoder. In active_features_ attribute in OneHotEncoder one can see a very good explanation how the attributes n_values_, feature_indices_ and active_features_ get filled after transform() was executed. My question is: For e.g. DataFrame based input data: How does the code look like

How do you use Keras LeakyReLU in Python?

I am trying to produce a CNN using Keras, and wrote the following code: I want to use Keras’s LeakyReLU activation layer instead of using Activation(‘relu’). However, I tried using LeakyReLU(alpha=0.1) in place, but this is an activation layer in Keras, and I get an error about using an activation layer and not an activation function. How can I use

Advertisement