Category "deep-learning"

Model Accuracy is High but Val_Accuracy is low

I'm trying to improve my val accuracy as it is very low. I have tried changing the batch_size, the number of images being used for validation and training. Adde

How to access image datasets from Dropbox?

I have a dataset of images on Dropbox it is in uncompressed folders, and I want to train a a model using google colab. How can I tell Colab where the dataset is

Error tokenizing remove pattern re.findall

I have error like this while cleaning text, i just tried to following code from web def remove_pattern(text, pattern): r = re.findall(pattern, text) fo

What does it mean if the validation accuracy is equal to the testing accuracy?

I am training a CNN model for my specific problem. I have divided the dataset into 70% training set, 20% validation set, and 10% test set. The validation accura

How to convert rgb mask to categorical in keras

I try to find a proper solution to convert a rgb mask from "cam vid" dataset to categorical mask. I have the list of rgb value and corresponding label. What is

Keras semantic segmentation, infinite epoch using ImageDataGenerators

I am trying to train a model based on the U-Net architecture. I am using two data generators (one for training, the other one for validation). However, whatever

Torch shape mismatch error while training a GPT2 model

I am trying to train a GPT2 language model for text generation tasks. I am trying to include an additional embedding layer (with POS-tagging) on top of token em

Will y_train change during training in keras?

I am trying to write a custom metric in keras like this: def C_index1(E,T): T = T.reshape(len(T),1) T_ind = T > T.T E_ind = E.reshape(len(E),1) E_ind

Work around Keras TypeError limitation when calling layer "tf.keras.backend.rnn_1"

I am trying to use Keras for an attention mechanism in a machine translation using an LSTM network. However, I get a TypeError exception when in my code. TypeEr

how to score part of the neural network once and the rest multiple times caching the intermediate layer?

I train a model A and try to use the output of the intermediate layer with the name="layer_x" as an additional input for model B. model A is using input1, and m

Continous Bag of Words

I have a question related to the continous Bag of Words model. If I have a vocabulary size of 1000, a window size of 2, and the number of nodes in the hidden la

Why does the freezeWeights fucntion not work for me in MatLab?

I am following the mathswork tutorial for transfer learning on the GoogLenet, and when it comes to the freezeWeights function, it just doesn't work for me, and

Slow prediction speed for translation model opus-mt-en-ro

I'm using the model Helsinki-NLP/opus-mt-en-ro from huggingface. To produce output, I'm using the following code: inputs = tokenizer( questions,

Dimension issues for LSTM sequence model on Keras

I'd like to train a simple LSTM model for sequence data with 128 time steps with 6 features for 118 multi-classes. The dimensions of the dataset are shown belo

How can I predict n number of future values using RNN which uses multiple features

I am having a use case where I need to predict n number of future values after using the given data. eg: I have data from Jan 1 2021 - Jan 1 2022. I need to pre

Alternatives for Error level Analysis (ELA)

I am working on Image processing with deep learning and I came on to the topic Error level Analysis which gives/shows the difference in compression level(I'm tr

Training of Siamese Network with Contrastive Loss Misses Parameter Updates

I try to implement a rather simple siamese network and a contrastive loss function. I use a pre-trained VGG16 as a backbone model and strip away the last ReLU a

Concatenation layer raise Value Error: as_list() is not defined on an unknown Tensor Shape

I'm Trying to making DNN using Wide Deep Nural Network using keras the following code produces the following after trying to implement it, I also making my cust

Setting up keras-rl2 on my M1 Macbook Pro

I am working on a project on Reinforcement Learning - and completely new at this. I installed keras-rl as pip install keras-rl, however it caused an error as ma

How contrastive loss work intuitively in siamese network

I am having issue in getting clear concept of contrastive loss used in siamese network. Here is pytorch formula torch.mean((1-label) * torch.pow(euclidean_dista