Category "deep-learning"

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

Keras Dense Model ValueError: logits and labels must have the same shape ((None, 200, 1) vs (None, 1, 1))

I'm new in machine learning and I'm trying to train a model. I'm using this Keras oficial example as a guide to set my dataset and feed it into the model: https

How can I calculate the Accurracy for a Graph Convolutional Networks?

how can I calculate the Accuracy on a GCN based on an event log? With my code I get the following result: Epoch: 0, Loss: 1.299316294690154, Accuracy: [tensor([

Pytorch: Finetuning the inputs to a non-pytorch model

I want to finetune the inputs to a XGBClassifier model using pytorch. I have an XGB classifier model which takes in a vector comprised of floats and integer val

Convert a pth pytorch file to an onnx model

I'm trying to convert a PyTorch model(pth file containing weights) to an onnx file then to a TensorFlow model since I work on TensorFlow. to then fine-tune it.