Skip to main content

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
0 answers
9 views

Quantification of Leaf Disease with Semantic Segmentation

I am trying to quantify leaf disease using dataset of original images and corresponding masks. I have two approaches in my mind: Train-Test model for Semantic Segmentation of Leaf and diseased region ...
Urwa Shanza's user avatar
0 votes
0 answers
12 views

Got numerical difference between two implementations

I've been working around RetNet (Paper: https://arxiv.org/pdf/2307.08621, PyTorch implementation: https://github.com/Jamie-Stirling/RetNet/). I rewrote the some of the code with TensorFlow: ...
UndefinedCpp's user avatar
0 votes
0 answers
11 views

CNN matrices shape for time series data processing

I would like to ask you for advice regarding CNNs for analysing 60000x16 data (single input) - time series records from 16 channels. I did some research on this and my initial idea was to use CNN with ...
kalmary's user avatar
0 votes
0 answers
7 views

How to train with convLSTM2D on variable input shape?

I am classifying time series of 72x72 images in 4 filters (just like RGB). Things work well ...
user43280's user avatar
  • 101
0 votes
0 answers
15 views

How to use Conv2D for make predictions on spatio-temporal data (non-image)?

I have multivariate time series data consists of 4 independent variables, 1 dependent variable (target variable), and spatial data (latitude and longitude). The data is taken from 5 different cities, ...
Riri Ana's user avatar
0 votes
0 answers
16 views

How do I initialize a bias for the final layer of a CNN if my final output is logits and not probabilities?

I'm working on a medical image binary segmentation problem using a U-Net in tensorflow, and my classes are extremely unbalanced (about 1 in 10,000). I want to initialize a good bias for the last layer ...
Thao Nguyen's user avatar
1 vote
0 answers
81 views

OLS and log-likelihood from scratch with Tensorflow

I'm trying to code ordinary least square regression from scratch using Tensorflow and calculate the log likelihood. The results, however, are very different from the ones I get from my baselevel model,...
saml's user avatar
  • 11
1 vote
0 answers
36 views

Reproducing results from classic dropout paper [closed]

In the classic paper "Dropout: A Simple Way to Prevent Neural Networks from Overfitting", there is a figure comparing the features learned by a one-layer autoencoder trained on MNIST with ...
Ari Herman's user avatar
0 votes
0 answers
59 views

Why the training accuracy stays high but validation accuracy does not change?

I have a binary classification problem. I get ROI mammogram images and then apply a decomposition algorithm and as output I get 5 images which summation of them results in the original image. Now, ...
Nmgh's user avatar
  • 31
0 votes
0 answers
20 views

cGAN: Discriminator loss going to zero while Generator's going always up but the result is very good

I have a Conditional Generative Adversarial Network for Quantum State Tomography. The metrics I am monitoring during the training process are the losses and the Fidelity (the degree of similarity ...
Dimitri's user avatar
  • 15
1 vote
1 answer
193 views

The loss of VAE is negative. is it normal?

the function loss of VAE is : ...
Ramzy's user avatar
  • 21
1 vote
0 answers
91 views

Dense network can't learn a horizontally shifted log?

I've lately ran into an interesting problem, trying to teach a dense network a seemingly simple monotonous function- to regress a logarithmic function; When this function was centered around 0 it ...
Michael Yahalom's user avatar
0 votes
1 answer
55 views

Creating a CNN model for multi-output prediction where one target variable is categorical, and others are numeric

I want to create a simple CNN model for multi-output prediction. The predicted values are four numeric values (all between 0-1) and one categorical value (4 classes). When I try to create a model ...
Dkasi's user avatar
  • 1
1 vote
0 answers
14 views

RecSys model performance stalling at 47% AUC and F1-Score. Is the problem due to ratio of users to items in my dataset?

I'm having trouble with making my validation metrics go down for the binary_crossentropy and go up for the F1-score and AUC. I've tried tuning my hyper parameters such as the number of latent features ...
Mig Rivera Cueva's user avatar
0 votes
1 answer
314 views

Why not use input padding in the first attention block in transformer decoder

I was studying the transformer decoder code below in Keras/Tensorflow. It was not clear how they made making decisions. In the first attention block below (self.attention_1), why did they use ...
Chika's user avatar
  • 1
0 votes
0 answers
17 views

Deconvolution vs tf.Reshape

I currently have a 1D-CNN which produces a 1D output due to the dense layers at the end of said CNN but want it to produce a 2D output. Instead of reshaping my tensor elements using tf.reshape, would ...
ryl06's user avatar
  • 1
1 vote
0 answers
73 views

Adam optimiser strange behaviour on first epoch if using EMA

In the first training epoch, the Adam optimiser seems to reset the weights of my model if I have use_ema=True. I am compiling a keras model and loading weights from a file using ...
ThreeOrangeOneRed's user avatar
1 vote
0 answers
25 views

Fluctuating validation accuracy with steady accuracy increase

I have four layers of CNN to predict Javanese script letter data. The training accuracy and loss monotonically increase and decrease respectively. But, my test accuracy starts to fluctuate wildly. I ...
MrSalad's user avatar
  • 11
1 vote
0 answers
212 views

Keras RMSProp what is the alternative to "decay" (no longer available after Keras 2.3)

Background: Hello, I'm creating a GAN with an RMSProp optimizer for both discriminator & generator. The generator model has half the learning rate of the discriminator (1e-4) and half the decay of ...
carsof's user avatar
  • 11
1 vote
1 answer
58 views

How to use Activation Functions in Quantized Nerual Networks?

I want to understand how quantized networks can calculate activations like sigmoid and tanh. I stumbled over this question which mentions the implementation of TF-Lite Micro as an example. ...
Necrotos's user avatar
0 votes
1 answer
21 views

How is this linear model producing non-linear output?

I trained a 1 unit 1 layer (which I assume is limited to being a linear model) on temperature data, which follows a sinusoidal pattern over time. I expected this limited model to just produce a line ...
Bobby's user avatar
  • 3
0 votes
1 answer
195 views

RNN/LSTM networks on spectrograms underfitting massively - is the CNN encoder a prerequisite?

I am prototyping a pipeline on the FSDD dataset (audio/10-class classification); the audio data are loaded with librosa, 0-padded/trimmed to 0.5 sec (4000-dimensioned numpy vectors) each and converted ...
Nikos H.'s user avatar
1 vote
1 answer
624 views

How to calculate the decay rate given an initial learning rate and final learning rate for schedulers when training neural networks?

I am training a neural network in TensorFlow and I would like to use firstly an exponential decay optimizer scheduler (https://www.tensorflow.org/api_docs/python/tf/keras/optimizers/schedules/...
user380572's user avatar
0 votes
1 answer
155 views

Best way to make an image classification model with dynamic image sizes

I'm working on a project where I need an image classification system, so I've decided to learn Tensorflow, and, after a week of study i've the following model: ...
Pinnaker's user avatar
1 vote
1 answer
593 views

Time series analysis hourly data Python SARIMAX or better another ML-Algorithm

I am working on my bachelor thesis with time series data. The idea is to predict the expected battery life based on voltage data from sensors. During my research I came across SARIMAX. For me this ML ...
Maximiliami's user avatar
0 votes
1 answer
1k views

Single input - multiple outputs with different loss functions in Keras: how is the gradient computed?

I've implemented a neural network with single input - multiple outputs using Keras API. The general structure of the network is like in this figure: Because each branch does a different task, I ...
Elise Le's user avatar
6 votes
1 answer
2k views

How to determine if two images contain the same object without a dataset?

The problem I am trying to solve is, given two images, determining whether they contain the same object or not. Here is an example: The first two images contain the same object, while the third image ...
NoahGav's user avatar
  • 161
0 votes
0 answers
86 views

Predict angle by linear loss

I'm trying to solve following nonlinear regression task: We got fixed point from which the bullet is released with some start speed v0 (value v0 changes each time). On the opposite side we generate ...
franz-german's user avatar
-1 votes
1 answer
689 views

Scikit-learn and Keras' MLP very different with same hyperparameters

I'm using Multilayer Perceptron ANNs at the very beginning of my project (it's a binary classification problem). Because it's simpler, I started with Scikit-learn. I got a magic result, with my model ...
Heliton Martins's user avatar
2 votes
1 answer
452 views

Threshold Tuning before or after parameter tuning?

My goal is to increase the F1 score of Class 1 by 1-2%. I achieved this by changing the threshold from 0.5 to X using the precision recall curve when the dataset is imbalanced. I did this after I have ...
Jason Rich Darmawan's user avatar
1 vote
1 answer
22 views

Accurracy for predicted vectors

I am currently working on a machine learning model that yields a vector of offloading decisions. An example: [-1, 0, -1, 1, 1, 0, ...] The model does not return this vector directly. Instead, the ...
YuKa's user avatar
  • 13
0 votes
0 answers
141 views

Is it possible to calculate an integral within a layer with tensorflow?

Is it possible to compute an integral within a layer in tensorflow and tensorflow probability? I have a simple MLP with a couple of dense layers and a concat layer. ...
Alucard's user avatar
  • 325
1 vote
0 answers
210 views

RNN with overlapping timestamp sequences

Maybe a newbie question here, but I’ve not had much experience with sequential models and I’ve not been able to find an example or clear answers to this question online. All tutorials and resources I ...
Jonathan Hill's user avatar
1 vote
1 answer
43 views

How to classify unseen data as anomaly

I trained a CNN model with 6 different classes (labels are 0-5) and I am getting more than 90% accuracy out of it. It can correctly classify the classed. I am actually trying to detect anomaly with it....
Nazmul1001's user avatar
1 vote
1 answer
64 views

Metric to evaluate binary classification model on imbalanced dataset in order to meet percentage limitations

For a university class I'm working on a imbalanced dataset that has ratio of 43:1 Class_0 to Class_1. Class_1 refer to companies that have declared bankruptcy based on feature columns of the dataset. ...
pchi's user avatar
  • 11
0 votes
1 answer
767 views

Predicting missing letters in a word

I am stuck with this machine learning problem. For input, we have a word in which some letters are missing, e.g., word = 'in---m-nt'. Then we can make up to 6 guesses. guess1 = 'e', then word = 'in--...
Qiuyi Li's user avatar
2 votes
1 answer
48 views

Shape of tensorflow model input

I'm reading Masking and padding with Keras, in the beginning, an input example is: ...
CyberPlayerOne's user avatar
0 votes
1 answer
165 views

Understanding keras layer structure/notation

I am trying to understand the following keras model: ...
user1886681's user avatar
1 vote
0 answers
200 views

Weighted Average of Multi Class AUC

Here, I can calculate the AUC score of each class individually in a multiclass problem (not to be confused with multilabel.) ...
Amirhossein Rezaei's user avatar
1 vote
0 answers
48 views

Data parallelism on multiple GPUs [closed]

I am trying to train a model using data parallelism on multiple GPUs. As I think, in data parallelism, we divide the data into batches, and then batches are deployed parallel. Afterward, the average ...
Ahmad's user avatar
  • 161
1 vote
1 answer
237 views

Use the Same Learning Rate to Train All Models When Doing Experiments For A Deep Learning Paper?

When writing a deep learning paper, I need to train several CNN models and compare their performances. They are from different architectures so different designs. I'm wondering should I use the same ...
Dwa's user avatar
  • 111
1 vote
1 answer
326 views

Best Loss Function for Shape Resemblance in Time Series

Basically, predicting future values step by step using past values and some covariates as a feature, using some LSTM, Conv layers from tensorflow. I started by using mean absolute percentage error as ...
Della's user avatar
  • 553
1 vote
0 answers
85 views

How we can interpret Playground on Tensorflow?

I need to understand how Playground on Tensorflow works. How can I interpret x1, x2, x1^2, x2^2 and... . Because in real neural network, we just have some numbers ...
Mahdi Amrollahi's user avatar
0 votes
0 answers
149 views

why the local reparameterization trick only works only for fully connected networks?

i was reading this article on towarddatascience and at a certain point the author says "An important difference is that local reparametrization works only for fully connected networks, while ...
Alucard's user avatar
  • 325
1 vote
1 answer
413 views

When adding batch norm layer do I need to added to all layers in DNN?

While developing deepfm model network I want to add batch norm layer because model seems to suffer from vanishing gradient. There are embedding layers, 2 layers a in deep model part and one dense ...
haneulkim's user avatar
  • 231
1 vote
0 answers
216 views

Why does the CNN model accuracy vary too much when the dataset is the same?

I have been working on a project where I have a lot of time series data(3000 csv file) from 6 different devices and I am trying to convert those data to an image array so that I can use them in CNN to ...
Nazmul1001's user avatar
1 vote
0 answers
120 views

CycleGAN cycle loss

I was reading the paper of CycleGAN and I was trying to implement it. However, my models does not converge to any good solution whatsoever, and since I've checked the implementation many times, I ...
Alberto's user avatar
  • 1,217
2 votes
1 answer
2k views

How should I train my CNN with a tiny dataset

I'm working on a problem where I aim to classify sections of a track made on the floor using tape, into either left turns, right turns or straight track. I'm struggling creating a CNN that is not ...
GroupTheory14's user avatar
1 vote
0 answers
52 views

How to implement simple VAE with sparse tensor in Tensorflow

thank you for reading. I have been attempting to train a simple VAE on very sparse 2D and 3D data. So far I have been training using dense tensors which - I think - is resulting in horrible training ...
Zephrom's user avatar
  • 11
0 votes
0 answers
252 views

Why is there a difference between training and validation accuracy when both of them are pointing to the same subset?

I was training a model and I accidentally pointed the training and testing set to the same dataset. I was surprised by the fact the validation and training accuracy are not the same. What could be the ...
Redet Getachew's user avatar

1
2 3 4 5
14