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.

224 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
0answers
87 views

How concatenate data to the output of a layer in Keras?

I currently have a simple autoencoder with a 1 layer encoder and 1 layer decoder. Instead of this structure, I want to concatenate a vector of values to the latent space before being passed into the ...
0
votes
0answers
110 views

Which ML algorithm, architecture and packages could be used for 3D sequence data with 4D-5D output?

I want to train a model on FEM simulations and predict the deformations and the stresses. So, the input is the geometry (~100k nodes with x, y, z dimensions) and the "master node", where the strain ...
0
votes
0answers
9 views

Tensorflow classification model - Training data questions

I am working on a classification problem. I have a set of data that is classified to different hierarchies . As an example we could have Description: whole grain brown bread with seeds 12 slices ...
0
votes
0answers
25 views

It is possible train a neural network for soccer players prediction?

I have a large number of players stats, such as goals, assist, meters run, passes, etc.. of 3 seasons. I would like to know if I can feed the Neural Network with the data and it will return the best ...
0
votes
0answers
54 views

Normalizing Feature/Label with Negative Values

I am creating a neural network using tensorflow that predicts the energy consumption of a vehicle. Originally, I planned on normalizing all of the features from 0 to 1 using the scikit-learn object ...
0
votes
1answer
35 views

Is there a Fastai vision's unet_learner equivalent in keras?

I have implemented Fastai vision's unet_learner successfully to get results. However, due to hardware compatibility issues, I have been forced to shift to TensorFlow, on reading equivalent for Fastai ...
0
votes
0answers
27 views

Sequence to Sequence model not training

I am working on a sequence to sequence chatbot model based on the Tensorflow NMT tutorial for a project. I have a database of about 15 million replies and around 3 million individual words. It is an ...
0
votes
0answers
16 views

How can i define a range of correct answers for an neural network, that predicts a continous value?

Take for example a NN that predicts the height of an animal. If the NN predicts a height within +/- 1 cm of the actual height the answer would be correct. I can not find options for this in e.g. Keras....
0
votes
0answers
7 views

How to test ssd inference using tensorflow

I am trying to test a particular network (ssd_inception_v2) using Tensorflow. I can train it, but I am not sure how to test the inference using the feed from my camera. I searched on the Tensorflow ...
0
votes
0answers
50 views

Using label encoder on a categorical feature that we want to embed

I have a dataset with feature that have very high cardinality, doing one-hot encoding is not an option because of memory limitations, so I am currently label encoding this feature and then I feed that ...
0
votes
0answers
144 views

keras mse adam val_loss much lower than nrmse?

I'm trying to make sense of the keras.models.Sequential reported val_loss. It is a much better ...
0
votes
1answer
2k views

imbalanced dataset - class weight vs weighted loss function

I'm working on a classification problem with a very imbalanced dataset. Many papers mention a "weighted cross-entropy loss function" or "focal loss with balancing weights". I can't find any of those ...
0
votes
0answers
23 views

tf sumpooling layer 1d vs 2d

I am currently working on a paper by Sturm et al. (2016) published in the Journal of Neuroscience trying to replicate their results using python and TensorFlow, Keras libraries. I have strong doubts ...
0
votes
1answer
69 views

Reparametrization trick in VAE at Evaluation time

So I've been trying to implement the Variational Auto-Encoder model of Kigma et.al, but something has been bugging me. While I understand the need for reparametrization trick at training time, the ...
0
votes
0answers
206 views

Calculating EER with anomaly detection using LSTM in python

I have dataset features evaluated from the touch screen and built-in sensors on smartphones. I want to implement an anomaly detection code using LSTM autoencoder in python to compute EER value (Equal ...
0
votes
0answers
32 views

Help in converting Tensoflow network to Keras network

The following code is creating a CNN using Tensorflow (imported as tf): ...
0
votes
0answers
373 views

VRNN (Variational Recurrent Neural Network) code with Variable Input Lengths on Tensorflow

I have been trying to write VRNN (Variational Recurrent Neural Network: A recurrent latent variable model for sequential data (NIPS 2015)) with variable input data length. My problem is that it is ...
0
votes
0answers
8 views

Performance Statistics Of Each Class in ML Classification problem

I am comparing the performance of two neural network architectures for a classification problem with three possible outputs. I am able to track the overall progress (validation accuracy/loss) of ...
0
votes
0answers
18 views

Keras - Neural Network learns correctly trend of data, but not amplitude

I built a Neural Network in Keras to learn a mapping between 4 coordinates x,y,z,d (with d=sqrt(x**2+y**2+z**2)) and a scalar ...
0
votes
0answers
23 views

Correcting Keras metrics for zero-padding in final time distributed layer

python=3.7 tensorflow=1.14 keras=2.3.1 I have trained a keras model to categorize each element of a sequence of variable ...
0
votes
0answers
188 views

What input for joint word and character embeddings

I'm implementing a neural network that classifies Tweets (positive/neutral/negative). I'm using GloVe Twitter word embeddings (200dim) but since I have a lot of OOV words I'd like to add to each ...
0
votes
0answers
135 views

How to add example ID to tf.keras.utils.Sequence?

I am using tf.keras.utils.Sequence to build a dataset and then model.fit() to train a model (similar to how it is done in this ...
0
votes
0answers
7 views

Identifying specific activation scores for certain classes in keras in multi-label classification

I have a question i am hoping somebody might be able to help with. I have trained a sequential model (keras) that attempts to understand multiple labels in a data set. There are hundreds of samples (...
0
votes
0answers
30 views

Best Method to Find Embedding Similarity Between Array of Items to One Single Item

Say I have an array of items purchased together and I have different attributes of these products purchased together. ...
0
votes
0answers
23 views

Setting seeds despite repeated training of CNNs?

I would like to compare the classification performance (like accuracy, precision, recall etc.) of different CNN architectures. I'm using Google Colab (GPU support), Tensorflow and Keras. Since it is ...
0
votes
1answer
72 views

Is there a difference between training with multiple objects in a single image and multiple objects in a different images?

I'm trying to generate data for my object detection network (which will be used for TensorFlow: ResNet). What I'm currently curious about is this: if I have the same total amount of data (each data ...
0
votes
0answers
8 views

Combining two structurally similar datasets from different sources

I am working with a text summarization problem, and I am trying to use the following architecture [Pointer Generator] (https://github.com/abisee/pointer-generator). My data set is VERY small (225 ...
0
votes
0answers
110 views

Why does Dice loss neglect to predict a random subset of classes?

I implemented Dice loss for a semantic segmentation problem (with a severe class imbalance in my dataset) as follows: ...
0
votes
0answers
30 views

Teaching movie recommendation network to avoid duplicates

I'm trying to implement a simple movie recommender using a neural network and collaborative filtering, i.e. given a list of movies the user has watched, what is a good movie recommendation. Results ...
0
votes
0answers
231 views

How can I coumpute Policy Gradient LOSS in tensorflow

I am self-studying RL and currently doing hw2 from Berkeley CS294-112. The thing I cannot figure out is how to compute loss in policy gradients. Basically, REINFORCE algorithm has the following update ...
0
votes
0answers
24 views

Is it a good idea to implement a sklearn model for a real time image processing application?

I'm testing a support vector machine (SVM) model trained with scikit learn library for image processing, but i don't know exactly if for real time this library could be better than tensorflow or both ...
0
votes
0answers
40 views

Why the Logistic regression model trained with tensorflow performed so poor

I trained a logistic regression model with tensorflow but the accuracy of the model was so poor (accuracy = 0.68). The model was trained using simulated dataset and the result should be very good. is ...
0
votes
0answers
10 views

Can a neural network independently change its learning parameters while the error between what was predicted and what was not the most minimal in R

I performed script which create forecast of usd/btc pair. Data was taken form open source https://www.cryptodatadownload.com/apac/ https://www.cryptodatadownload.com/cdd/Binance_BTCUSDT_1h.csv Here ...
0
votes
0answers
57 views

Chinese character recognition from generated images - Validation accuracy does not improve

I am currently working on creating a simple Chinese character recognition network. Given an grayscale image of a character, the goal is to predict the depicted character. I want to run the model on a ...
0
votes
0answers
68 views

Data balancing in image classification

I've to segment defects from an image. The image consists of only tomatoes with it's defects in it. The defects and tomatoes in the dataset are as follows: ...
0
votes
1answer
44 views

Increasing sample size increases no of trainable parameters

I was working with keras and tensorflow as backend on an NLP problem when I observed that increasing my training data size caused an increase in the number of trainable parameters even when batch size ...
0
votes
0answers
18 views

How can I iterate on the hidden activations in a neural network? - Lifetime and spatial sparsity in WTA Autoencoders

I've built a convolutional autoencoder and trained it on MNIST in keras and tensorflow. I wanted to make this autoencoder a WTA autoencoder as talked about in this paper. To do so, I need to add ...
0
votes
1answer
29 views

Dynamic/ Static outputs are not same, why?

I am trying to implement a patch creation function with using tensorflow's extract_image_patches function but dynamic output shape is not same as my expectation. Let me tell briefly what it does. ...
0
votes
0answers
43 views

MNIST with Tensorflow and Keras, same architecture but less accurate in Tensorflow

I implemented a neural network in Keras and Tensorflow to make predictions on the MNIST dataset. I used the same architecture for both Keras and Tensorflow. While the code in Keras gives me always an ...
0
votes
1answer
22 views

Class Imbalence Problem even after Balancing Data

So I am training a neural network on a binary classification problem and my Case (1) and Controls (0) were imbalanced so I oversampled my cases so that that the training set was 0.5053 made up of ...
0
votes
1answer
64 views

How to handle timeseries extremes (sigma > 20) in deep learning?

I'm using 16-channel, 400-Hz, standardized EEG data to train CNN-LSTM for seizure classification. The data contains $O(3)$ sigma > 20 points, rarely thousands in a ...
0
votes
0answers
39 views

Holdout loss much worse than training & testing data

I am creating a simple MLP which is to predict a single output based and 9 inputs. The data is scaled between 0 and 1, and the data is shuffled before training. The resulting model leads to very low ...
0
votes
0answers
498 views

Custom TF 2.0 training loop performing considerably worse than keras fit_generator - can't understand why

In trying to better understand tensorflow 2.0, I am trying to write a custom training loop to replicate the work of the keras fit_generator function. In my head, I have replicated the steps ...
0
votes
0answers
35 views

Machine Learning: Model doesn´t recognize letters but has 80% accuracy

I have build a model to classify numbers and characters on Images. I trained it on the Chars74K dataset and in training it has 80% validation accuracy. I just use the number and uppercase characters ...
0
votes
0answers
34 views

Confusion with Computing Probabilities of a Normal Distribution without the Integral

How does this code is calculating the probability of Normal distribution without calculating the integral ...
0
votes
1answer
95 views
0
votes
1answer
35 views

How to predict similarity of unseen data to the training set?

I have a time series of human pose data which are recorded from real humans. I want to train the model with unsupervised learning on the training data. Let's call this the "real" training data. The ...
0
votes
0answers
30 views

ML Regressor model performance conclusion RSME vs STD DEV

Perhaps my question is still slightly silly but apparently even though lot of folks talk about how to evaluate the rightness of your model there still blur the right evaluation procedure at least for ...
0
votes
1answer
318 views

How to reconstruct negative acceleration values using a simple autoencoder?

I am trying to reconstruct the acceleration values of a tri-axial accelerometer using a simple autoencoder. As acceleration values are often negative (e.g, -3.4) therefore using a ReLU activation ...