Questions tagged [tensorflow]

A Python library for deep learning developed by Google. Use this tag for any on-topic question that (a) involves tensorflow either as a critical part of the question or expected answer, & (b) is not just about how to use tensorflow.

Filter by
Sorted by
Tagged with
0
votes
0answers
8 views

Why does tf.keras.experimental.preprocessing.Normalization sum over all samples, and why can't this be changed? (Time-series)

From my understanding, when dealing with time-series data, it makes sense to sum normalize the features channel-wise in the time-domain. This means that we treat each channel separately and sum over ...
0
votes
0answers
14 views

Interpretation of Loss and validation Loss in Keras

I am building a model to predict one label by taking one feature as an input. The two variables seems to be strongly correlated. I wanted to build a (sequential) Neural Network model with Keras in ...
1
vote
0answers
30 views

Why can't I classify my data perfectly on this simple problem using a NN?

I have a set of observations made of 10 features, each of these features being a real number in the interval (0,2). Say I wanted to train a simple neural network to classify whether the average of ...
0
votes
0answers
7 views

How does Keras Evaluate handle Multilabel Sigmoid Problems

As I am working on tuning a model multilabel densely connected model, I am realizing that I don't understand how the model is being evaluated. My current model has 20 potential labels and ends with a ...
0
votes
0answers
15 views

Multi-step Multi-Feature RNNs [closed]

I'm currently looking into implementing two RNNs following the below architectures where the target is a numerical value (the task is framed as a regression task) and the red boxes in the second ...
0
votes
0answers
14 views

Code help about creating custom loss function in tensor flow

I am trying to create my custom loss function for solving the regression problem using the RNN layers. For my specific dataset, I need the following conditions for updating my loss function: ...
-2
votes
0answers
27 views

Keras, simple CNN with binary classification doesn't converge — minimal example [duplicate]

I am new to NN and Keras. I have tried this tutorial and followed it until the lady showed the first training results ~30min in. I followed the steps exactly except the lines with 'shuffle' since that ...
0
votes
0answers
17 views

Can I use activity regularization to achieve a batch-norm like effect?

Rather then using batch norm layers would it be possible to just add a loss term that penalizes non-normally distributed outputs? I have been having trouble using batch-norm in training GANs since it ...
1
vote
0answers
17 views

Simple LassoRegression Outperforming Tensorflow?

I am trying to predict the bookings of a stand-up comedian cafe. There are a lot of features I can use which have an affect on the number of sales. (e.g. day of the year, weather, average sales last ...
0
votes
0answers
6 views

why is the accuracy of my RNN model going up and down so much

So I am using RNNs and using the train and test datasets. I have pre processed all the data and used one hot encoding, normalization, feature selection etc but the accuracy of the model is looking a ...
0
votes
0answers
9 views

Autoencoder with feature maps as latent representation in TensorFlow - 3D voxel model reconstruction

I am working on a 3D voxel model reconstruction network based on autoencoder architecture. I am using ResNet152v2 as encoder and then transposed 3D convolutional layers with stride = 2 and padding = &...
0
votes
0answers
22 views

Likelihood function in Bayes by Backprop

I am relatively new to the bayesian deep learning domain, for the kind of regressions problems I am focusing on, I generate my data synthetically using some conventional numerical methods (Finite ...
0
votes
0answers
7 views

How to celebA HQ dataset generation? [migrated]

I want to create the celebA-HQ dataset (https://paperswithcode.com/dataset/celeba-hq). It seems to be awful to find a way to download and generate it. I have found a gdrive version: https://drive....
1
vote
0answers
13 views

How to do online training in keras?

How to use a stateful RNN in online training in keras. So at each time step I get one element of one sequence. I have sequence1: e11 ->e12 - >e13 Sequence 2: e21 ->e22 ->e22 Seq 3....... ...
0
votes
0answers
16 views

What will be the Precision and Recall value for Faster RCNN?

I am using TensorFlow object detection API for Faster RCNN object detector. Now I want to measure the performance of my model, so I have evaluated it using the code below for getting the mAP, ...
0
votes
0answers
2 views

Calculating micro F-1 score in keras

I have a dataset with 15 imbalanced classes and trying to do multilabel classification with keras. I am trying to use micro F-1 score as a metric. My model: ...
0
votes
0answers
3 views

What is the difference between a BERT model using the ktrain Wrapper vs a BERT model using the hugging face transformer

I came across two ways of building the BERT model and was wondering if there are any significant differences in the way they work or of they are the same. Thank you
1
vote
0answers
16 views

keras input data ratio setting

a newbie question not sure if it's a correct method since I've got an imbalanced dataset (binary class, class1 12000 class0 2000, class separated in different folder) I found that my model sometime ...
0
votes
0answers
19 views

Is consecutive training of the same NN with different loss/cost functions a valid technique?

I am training a regression CNN using Python 3.8 and TensorFlow 2+ with a 92 Softmax output. At first I was using Mean Squared Error as my network's loss function, which was good at predicting large ...
0
votes
0answers
31 views

Bayesian neural nets - Not able to get reasonable results with DenseVariational layers

I am trying a regression problem with the following dataset (sinusoidal curve) of size 500 First, I tried with 2 dense layer with 10 units each ...
0
votes
0answers
11 views

ANN Train and Test set accuracy becomes 1.0 after second Epoch Keras Classifier

I have the following classification model built: ...
0
votes
0answers
32 views

imbalanced dataset with lots of csv operation (tensorflow,keras)

A project with about 14000 csv files (about 12000 class 0 and 2000 for class 1 for each csv contain 365 columns and 3330 rows (value are either 0 or 1 ) 1.is there any sample code for this kind of ...
0
votes
0answers
15 views

where to find pretrained model for emotion recognition in videos

I am a newbie in machine learning and looking to classify facial emotions from video frames in python. And looking for some pretrained models that could help predict emotions. I am not sure how to do ...
0
votes
1answer
26 views

Need of Exp bijector in the learning the Normal?

I am trying to understand TransformedVariable class in tensorflow probability. The website provides the following example: ...
0
votes
0answers
19 views

Implementing Multiclass Dice Loss Function

I am doing multi class segmentation using UNet. My output from the model is, ...
1
vote
1answer
21 views

Extracting word embedding features of a sentence using Transformer-XL

As you know, there are several pre-trained models that we can use to extract word embeddings. As an example, I can use the following codes to retrieve word2vec features of my text: ...
1
vote
1answer
30 views

Can I transform the Viterbi score from tensorflow into a probability?

I understand the Viterbi algorithm as it is explained in Wikipedia However, the TensorFlow implementation is different: ...
1
vote
0answers
26 views

Tensor linearization interview question [closed]

I got the following question in a coding interview for machine learning engineer position. Write a function: ...
2
votes
1answer
10 views

Updating of characer's embedding inside an RNN during character generation task

In one of the tutorials of tensorflow, there is a "text generation with an RNN" tutorial. When creating the model, they create a mapping of characters to IDs and vice versa. Then in the ...
0
votes
0answers
28 views

Improvement in NN regressor by Negative Log Liklihood loss vs MSE loss

I am trying to write a simple NN based regressor, and I have noticed that if i take two identical NN, one with mean square error loss, ane with sample drawn as gaussian prior over final output, with ...
0
votes
0answers
10 views

Inferior accuracy of Bayes by backpropogation verses backpropogation

I want to build a simple regression NN over 300 dimensional input (x_train = n x 300, n= number of training samples). For the same, my NN works quite satisfactorily (as compared against kernel ridge ...
0
votes
1answer
39 views

What is masking in the attention if all you need paper?

I am a newbie to the NLP and specifically, the attention is all you need and I can understand the encoder part of the paper. However, I am baffled about the decoder part. In the pic below and the ...
1
vote
1answer
51 views

Tensorflow loss and accuracy during training weird values

I am doing some testing with tensorflow, and I bumbed into a very weird behaviour. Here is my code ...
0
votes
0answers
14 views

Extracting features from RNN networks

So we know that it is possible to extract features of the last layers from models such as AlexNet that are trained to classify images and use them for other vision tasks. That fact is true for ...
1
vote
0answers
20 views

spikes in training CNN using Adam

I have an instability issue when training CNN on high dimensional data. I train Unet-3D model (https://arxiv.org/pdf/1505.04597.pdf) with batch normalization layer before each convolution layer. My ...
0
votes
0answers
33 views

Batch normalization leads to unstable validation loss

I am not sure if I can do this, however, this is a question that I am very interested in because I am facing the exact issue and I can't seem to find answers for it so... If you don't wanna read the ...
0
votes
1answer
59 views

Tversky Loss function for RGB masks

I have a very imbalanced dataset for my semantic segmentation problem (monitoring deforestation using setellite images) and I found Tversky Loss to be much better than categorical crossentropy (due to ...
0
votes
0answers
21 views

Tensorflow unit scale preprocessing layer

I would like to have a keras model self-contained to reduce the training/serving skew. It would mean here having a preprocessing layer that is doing essentially what MinMaxScaler from scikit learn is ...
2
votes
0answers
68 views

LeNet-5 Subsample Layer in Tensorflow

In Tensorflow, how do you implement the LeNet-5 pooling layers with trainable coefficient and bias terms? Reading through the LeNet-5 paper, the subsample layers are described as follows: Layer S2 is ...
0
votes
0answers
6 views

Does TensorFlow's Object Detection API models look at the whole image or only the bounded target?

I was wondering if CNNs, specifically the models/feature extractors offered in Tensorflow's Object Detection API, only train on the bounded box of the target image or if it considers the entire image ...
0
votes
0answers
27 views

Add k-means layer to Keras model

I'm using a GAN to generate pixel-art images. The structure follow the Tensorflow tutorial on how to do GAN closely. My network outputs gradient-rich images, which look like down-scaled photos rather ...
3
votes
1answer
85 views

correcting for extremely downsampled data: keras class_weight is hurting my model

I have an extremely imbalanced dataset (millions of times more negatives) for a binary classification NN model. I am aggressively downsampling solely for the purpose of making training time manageable,...
0
votes
1answer
59 views

Can I use the mse loss function along with a sigmoid activation in my VAE?

I have implemented a VAE with a mse loss for the reconstruction loss and a sigmoid activation in my last layer of the decoder. For my use-case the reconstructed images seemed fair. Most examples on ...
3
votes
1answer
69 views

accuracy decreases with number of folds in x-validation

I am running a Sequential model in Tensorflow for binary classification. I cross-validate it using sklearn's KFold with 50 folds. The strange thing is that the binary accuracy has a trend of ...
0
votes
0answers
26 views

How to reduce losses simultaneously in keras models with multiple outputs

I'm building a regression neural network with one input and two outputs. During the training process, I find there is a trade-off between the validation MAE the two outputs and it is difficult to ...
0
votes
0answers
10 views

Can the scale Struct2depth be recovered given the real focal length?

Recently I read a great paper, struct2depth. But as I noticed that the scale is normalized in this paper, I wonder: if one can recover the actual ...
1
vote
0answers
22 views

Transfer learning from pretrained NN model for non image sequential data

I have a standard numeric dataset where the predictors are sequential much like an NLP task (not sequenced longitudinally for RNN implementation) with multi-class response to build a classification ...
1
vote
1answer
26 views

What do the individual parts of the full name mean when something like ResNet-FasterRCNN is mentioned?

What i mean by the title is as follows: Say I went into Tensorflows Object Detection Model zoo and picked some model like, Faster R-CNN ResNet101 V1 1024x1024. My question is, what is the architecture ...
0
votes
0answers
35 views

Interpretation of Precision and Recall from Object detection API?

In given picture I have precision and recall value -1.000. What does this signify? Could someone please help me to interpret this results? Furthermore Can I calculate F1 score for this average ...
3
votes
0answers
70 views

Designing an ML model for solving nonograms

The Problem I am trying to create a model to solve nonograms. I want to solve nonograms of any size $N\times N$ where $ \mathbb{N} \ni N\leq 10$. (but actualy I will be happy with a fixed size for ...

1
2 3 4 5
13