Questions tagged [logits]

40 questions
0
votes
1 answer

ValueError: logits and labels must have the same shape ((None, 1) vs (None, 10000)) when trying to classify IMDB reviews

I'm trying to classify IMDB movie reviews with binary classification using Keras. The following is the code I used. from keras import models from keras import layers model =…
Pavindu
  • 2,684
  • 6
  • 44
  • 77
0
votes
1 answer

ValueError: logits and labels must have the same shape ((None, 23, 23, 1) vs (None, 1))

am new to ML so i don't really know what am doing i don't know what logits means in the code i haven't even written logits i just followed a YouTube tutorial to get my self familiar with the environment.. this is the entire code thanks for your…
0
votes
1 answer

Why do I receive this numpy error when using statsmodels to predict test values?

I am getting an error when trying to use statsmodels .predict to predict my test values. Code: X_train, X_test, y_train, y_test = train_test_split(X_new_np, y, test_size=0.2, random_state=42) logit = sm.Logit(y_train, X_train) reg =…
mpollinger
  • 63
  • 5
0
votes
1 answer

How to fix the problem the error number of items to replace is not a multiple of replacement length in R?

I am trying to do spatial predictions with GAM and rasters. I have a raster file of depth data (Depth_R.asc), and presence and absence data of species from 248 locations (Depth.csv) . First I fitted these 248 data and then used raster:predict…
Ecology
  • 55
  • 5
0
votes
1 answer

calculating attention scores in Bahdanau attention in tensorflow using decoder hidden state and encoder output

This question relates to the neural machine translation shown here: Neural Machine Translation self.W1 and self.W2 are initialized to dense neural layers of 10 units each, in lines 4 and 5 in the __init__ function of class BahdanauAttention In the…
Utpal Mattoo
  • 890
  • 3
  • 17
  • 41
0
votes
1 answer

Package for Multivariate Multinomial Logit

I would like to jointly estimate 3 variables. Two of them are categorical and the other one is binary. So I thought about a "multivariate multinomial logit model". I found a lot of theory about it (for Example Agresti 2007 Ch. 9 or Beel and Paap…
0
votes
1 answer

Shape mismatch, 2D Input & 2D Labels

I want to create a neural network, that -easy speaking- creates an image out of an image (greyscale) I have successfully created a dataset of 3200 examples of input and output (label) images. (I know the dataset should be larger but that is not the…
Philipp W
  • 3
  • 1
0
votes
1 answer

Logit Cross Validation not running

Running the train algorithm for biopsy dataset using 'glm' method I had the error due to invalid number of intervals. I tried to run the R code: biopsy_ = na.omit(biopsy[,-c(1)]) # 1 = ID # biopsy_$class = 1 # ctrl <-…
0
votes
1 answer

Obtaining Logits of the output from deeplab model

I'm using a pre-trained deeplab model (from here) to obtain segmentations for an input image. I'm able to obtain the sematic labels (i.e. SemanticPredictions) which is argmax applied to logits (link). I was wondering if there is an easy way to…
Zahra
  • 6,798
  • 9
  • 51
  • 76
-1
votes
4 answers

Error During Python Train Data so how to train data

Epoch 1/100 ValueError Traceback (most recent call last) in () ----> 1 model_history=classifier.fit(X_train,Y_train,batch_size=100,validation_split=0.2,epochs = 100) 1…
1 2
3