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
12 views

How to implement RNN using tensorflow graph? [closed]

Should I use loop? How to map different y to loss function? What approach is used in keras?
0
votes
0answers
12 views

Using pretrained LSTM and Bert Models in CPU Only Environment - How to speed up Predictions?

I have trained two text classification models using GPU on Azure. The models are the following Bert (ktrain) Lstm Word2Vec (tensorflow) Exaples of the code can be found here: NLP I saved the models ...
0
votes
0answers
9 views

latency not decreased tf-lite post training quantization

I am using efficient-net to classify images. I have trained model successfully and wanted to quantize it using tf-lite. I tried all the methods available in tf-lite quantization to check accuracy, ...
2
votes
1answer
25 views

Padding a time series for neural networks during cross validation

I am trying to train a neural network on some time series data and decided to implement cross validation for my model. The cross validation method I'm trying to implement is the Day Forward-Chaining ...
1
vote
1answer
24 views

LSTM input and output parameter (not time series, not NLP)

I have asked this question on stackoverflow but nobody answers. So I come here in the hope that somebody could help me solve it. Thank you! Here is my question: I am a little bit confusing about how ...
0
votes
0answers
7 views

Optimizing deployment on Tensorflow Serving [closed]

I have built a classification model that I plan to deploy using tf serving. I noted inference times locally (without tf serving) by repeatedly doing predictions over a few images. I noticed that the ...
0
votes
3answers
55 views

What is the ppf of the truncated normal distribution?

What is the percent point function (ppf), or inverse cdf, of the truncated normal distribution? The distribution and cdf is defined here: https://en.wikipedia.org/wiki/Truncated_normal_distribution $$...
1
vote
0answers
37 views

High resolution in style transfer

I'm investigating a bit about neural style transfer and its practical applications and I've encountered a major issue. Are there methods for high resolution style transfer? I mean, the original Gatys' ...
0
votes
0answers
15 views

Why an increasing validation loss and validation accuracy signifies overfitting?

When I train a neural network, I observe an increasing validation loss, while at the same time, the validation accuracy is also increased. I have read explanations related to the phenomenon, and it ...
0
votes
0answers
26 views

Actions to take to improve validation accuracy [duplicate]

I am training a CNN model which takes input of 128x128x3 color images and is trained to predict the coordinates of ...
1
vote
1answer
30 views

NLP Emotion Detection - Model fails to learn to recognize negations

I am working on a nlp emotion detection project. The emotions that I try to predict are 'joy', 'fear', 'anger', 'sadness'. I used some publicly available labeled datasets to train my model e.g. ISEAR, ...
2
votes
1answer
36 views

how is tensorflow reduce_sum finding the intersection in the below code for dice coefficient?

In the below code I am not able to grasp how multiplying y_true and y_pred and putting reduce_sum on it gives the intersection between the two ...
0
votes
0answers
9 views

DL model for solving a multi-class classification problem works fine for the first class and then the performance gradually drops for other classes

I designed an AE shaped deep neural network to perform a multi-label class classification. The classes are not mutually exclusive. The last layer has n neurons; one responsible for each class. I pass ...
0
votes
0answers
18 views

multi-label classification in keras with huge number of classes

I have a training data of shape (100000,1200) and associated classes of size 3000. i.e, each sample has 1200 features and has to be mapped to one of the 3000 classes. How many hidden layers are ...
0
votes
0answers
13 views

Tensorflow Hidden Markov model

A decoding HMM has 3 parameters. But I am bit confused in tensorflow's HMM parameters and I'm not clear with docs https://www.tensorflow.org/probability/api_docs/python/tfp/distributions/...
0
votes
0answers
8 views

How to use tensorflow's module HiddenMarkovModel in pos tagging?

I want to do part-of-speech tagging using HMM. I want to use tensorflow module for viterbi algorithm. I know HMM takes 3 parameters Initial distribution, transition and emission matrix. But don't know ...
0
votes
0answers
12 views

How to implement text autoencoder for outlier detection?

I have a imbalanced text dataset, with distribution of the classes like this: ...
1
vote
1answer
24 views

Why does my Deep Learning Network converge to mean value of series when trying to fitting & predicting a time series?

There's a task requiring me to predict selling price of a product with provided external data containing historical purchasing prices and selling prices of competitors(positive correlated). ...
0
votes
0answers
6 views

How to construct input dependent convolutional filter (kernel)?

I am constructing a convolutional variational autoencoder for images, starting out with mnist digits. Typically I would specify convolutional layers in the following way: ...
0
votes
0answers
26 views

LSTM good test/validation performance but poor on unseen data for binary classification

I have 30k sequences of 8 letters that needs to be classified in X or Y depending on the relative position of letters in the sequence. The features are converted to numbers via a dict mapping and ...
2
votes
1answer
54 views

“IF statement” in a Neural Network

In classification problems, it is frequent to have classes with different properties. For example, I came across a problem where I needed to classify the following images in a single network: White ...
0
votes
0answers
11 views

Deep Q learning with Tensorflow and OpenAI

I'm very curious about deep reinforcement learning so I'm fighting against code and tutorial to learn more about reinforcement learning. But it's the end of the day and I wasn't able to understand the ...
0
votes
0answers
4 views

How to implement a transfer learning like training process?

I've been working on a UNet and I've been advised to try a transfer learning style approach. My issue is that I can't visualise the training procedure, I've got myself confused by overthinking the ...
0
votes
0answers
13 views

Multi-Class Multi-Label Text Classification With RNN

I am training a Muti-Label classifier on text data by using sigmoid activation and binary_crossentropy as suggested in many ...
0
votes
0answers
28 views

ROC Curves for Regression Output

I am working on a broad machine learning-based problem, which can be approached in several different ways. Essentially, my training values are floats between 0.0 and 1.0, and I have approached this in ...
0
votes
1answer
34 views

Loss function depending on the derivative of a neural network with respect to the input in tensorflow

I have a neural network $x \mapsto f(x, \theta)$, and I can access predictions in my code with out = model(X). Imagine that I have a loss function $l(x,y) = (y-\...
2
votes
0answers
41 views

Machine-learning regression coefficients

Say I want to do supervised learning of response variable $y_k$ (continuous) and feature variables $(x_k, z_k, a_k, b_k)$ where $k$ is the sample index. Instead of learning the general form $$ y \sim ...
0
votes
0answers
10 views

Can we normalize the features extracted from a pre-trained VGG16/19 network

I am working with features extracted from pre-trained VGG16 and VGG19 models. The features have been extracted from second fully connected layer (FC2) of the above networks. The resulting feature ...
0
votes
1answer
38 views

Why is the speed of fully connected neural network very fast no matter how large the prediction dataset is?

I used tensorflow(GPU and CPU) to train a 5-layers fully connected DNN with few parameters (Less than 300 parameters). And then I use it to predict two datasets with data sizes of 1000 and 1 million, ...
0
votes
0answers
55 views

As epsilon decays, rewards gets worse during exploitation than exploration

I am currently trying to write learning agent from the "Human Level Control in DRL" Paper in Tensorflow 2.0. I've copied the recommended hyperparameters and picked the easiest environment ...
1
vote
1answer
35 views

Variational Autoencoder (VAE) latent features

I'm new to DL and I'm working on VAE for biomedical images. I need to extract relevant features from ct scan. So I created first an autoencoder and after a VAE. My doubt is that I don't know from ...
0
votes
0answers
9 views

TF object detection - The total number of detected objects is not increasing

I'm building a model to recognize fishes in the aquarium (150 different fishes). I'm using a faster_rcnn_inception_v2_coco_2018_01_28 model for transfer learning from TF object detection API. I have ...
1
vote
0answers
18 views

Why the training loss is a stepped decreasing curve

I'm training a classification model, and I keep getting training loss like this: The validation loss is similar with the training loss: I'm using Adam optimiser ...
2
votes
0answers
24 views

What are good values for sample weights for UNet?

I'm trying to implement U-Net (https://arxiv.org/abs/1505.04597) from scratch using Keras. The thing about UNet apart from its architecture, is that it's using weight-maps from the input images in the ...
0
votes
0answers
46 views

Compute hinge loss just for the positive class in tensorflow

How to implement hinge loss only for positive class in Tensorflow? I have binary classification task so the output is one-hot encoding of the label. So given out (Tensor of shape (batch_size,2)) and ...
1
vote
0answers
17 views

Gamma Regression as the Last Layer of the Neural Network

My current task involves predicting data that follows a Gamma distribution. To avoid confusion of notations, in the following discussion, the p.d.f will be $$\mathbb{P}(y|\alpha, \beta)=\frac{\beta^\...
0
votes
0answers
11 views

Why is Conv2D working better than Conv3D if more information is given?

I have time series data, yet it is not 1D but 3D (2D maps of different variables (wind, temperature,...)). Thus, my data is overall of 4D (timestep, latitude, longitude, variables). I want to ...
0
votes
0answers
39 views

accuracy vs val_accuracy in tensorflow

I'm a newbie in DL/ML. What is accuracy and val_accuracy in model.fit() in tensorFlow.keras. How that accuracy and val_accuracy ...
1
vote
0answers
17 views

LSTM for multivariate time-series classification with unequal timesteps

I am attempting to use RNN or LSTM for multivariate time-series classification of my data. A sample corresponds to an actor, a time-step corresponds to an action and a single action consists of many ...
1
vote
0answers
26 views

Why it's necessary to frozen all inner state of a Batch Normalization layer when fine-tuning

The following content comes from Keras tutorial This behavior has been introduced in TensorFlow 2.0, in order to enable layer.trainable = False to produce the most commonly expected behavior in the ...
0
votes
1answer
725 views

TF Keras ValueError: Shapes (None, 3, 3) and (None, 3) are incompatible

When running my LSTM model, in which I want to take an input (x,y) and output a sequence [(x1,y1), (x2, y2)..., (x,y)] I get a ...
0
votes
0answers
17 views

Using an RNN to generate a sequence with a static end point using TF and Keras

I'm currently learning about how to use neural networks while working on a project of mine. In the project I'm attempting to have a neural network create a path from a starting point (0,0) to an end ...
2
votes
0answers
28 views

Application of Wavelet Transform and Differencing on Time Series Data (to denoise and remove seasonal adjustment and other trends)

I am working on an LSTM model to predict time series data (stock prices) and I would like an opinion whether to denoise my data or not before feeding it into the model. According to INVESTOPEDIA, ...
0
votes
0answers
4 views

Custom Tensorflow v2.x Optimizer with Sparse update support

I am trying to contribute to tensorflow v2. I am done with _resource_apply_dense but i am struggling with _resource_apply_sparse. There are multiple ways to handle but there is no proper discussion ...
1
vote
0answers
16 views

If overfitting occurs, what should i focus more? [duplicate]

I'm a graduate student who are studying AI. I have constructed one model for voice classification but, overfitting occurred. I tried a lot to overcome this phenomenon. (i.e. weight standardization, ...
0
votes
0answers
20 views

Is there multiple Basic-RNN cells in a single layer?And is it different from Bidirectional RNN?

Recently, I read a book which describe : if there are two Basic-RNN cells in a single layer, each cell will take hidden states from the other one as input. like this picture: The hidden state of ...
0
votes
0answers
8 views

How to OCR string of known format but variable scale and rotation?

I am trying to build my own OCR for reading serial numbers from package photos, that people will upload to the web page. Preferably based on TensorFlow + Keras, as my poor experience is with these ...
0
votes
0answers
14 views

Re-training deep learning models multiple times to be able to compare their performance?

Let us say I have two deep learning models that differ in their hyperparameters and I want to compare their performance to each other (in terms of acc/ROC for example). However, a single value from ...
2
votes
1answer
80 views

Numerical computation of cross entropy in practice

The equation for cross-entropy is: $H(p,q)=-\sum_x{p(x)\log{q(x)}}$ When working with a binary classification problem, the ground truth is often provided to us as binary (i.e. 1's and 0's). If I ...
0
votes
0answers
21 views

Test scores are way lower than cross-validation scores

I split my Dataset with 80% of the data for training and 20% for the test in the context of a binary classification task with a very unbalanced dataset. On the training set I do a 3 folds ...

1
2 3 4 5
12