Questions tagged [tensorflow]

TensorFlow is an open source library for machine learning and machine intelligence. TensorFlow uses data flow graphs with tensors flowing along edges. For details, see https://www.tensorflow.org. TensorFlow is released under an Apache 2.0 License.

736 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
2k views

Tensorflow v1 Dataset API AttributeError with ndim

I'd like to make pipeline for optimizing Gpu and Cpu. Dataset:https://archive.ics.uci.edu/ml/datasets/combined+cycle+power+plant It's about 10000 datapoint and 4 description variables for regression ...
5
votes
0answers
1k views

Why is my Keras model not learning image segmentation?

Edit: as is turns out, not even the model's initial creator could successfully fine-tune it. This is most likely a problem of implementation, or possibly related to the non-intuitive way in which the ...
5
votes
2answers
212 views

Text topic classification in tensorflow

I want to create a CNN in tensorflow that does the following: Classify a recipe headline and find out the topic. For instance <...
4
votes
0answers
115 views

How to detect vanishing and exploding gradients with Tensorboard?

I have two "sub-questions" 1) How can I detect vanishing or exploding gradients with Tensorboard, given the fact that currently write_grads=True is deprecated in the Tensorboard callback as per "un-...
4
votes
0answers
368 views

Tensorflow, Optimizer.apply_gradient: 'NoneType' object has no attribute 'merge_call'

My programme gives the following error message: ...
4
votes
0answers
167 views

Why does my model only converge when I add a MaxPooling with stride of 1 layer at the beginning?

I have a model that takes an input of inertial sensor data collected at 60 hertz and outputs one of two classes. I have broken the data into 1 min snapshots which seems to be appropriate. I have split ...
4
votes
1answer
305 views

How to reload cell in jupyter notebook? After OSError: [Errno 12] Cannot allocate memory

I got an error: OSError: [Errno 12] Cannot allocate memory I deleted some files. And I have free memory. I don't want start learning again from first epoch. (I got ...
4
votes
0answers
1k views

Using the Python Keras multi_gpu_model with LSTM / GRU to predict Timeseries data

I'm having an issue with python keras LSTM / GRU layers with multi_gpu_model for machine learning. When I use a single GPU, the predictions work correctly ...
4
votes
0answers
280 views

Multiple activation functions with TensorFlow estimator DNNClassifier

I just want to know if is it possible to use tf.estimator.DNNClassifier with multiple different activation functions. I mean, could I use a DNNClassifier estimator which use different activation ...
4
votes
0answers
668 views

AUC computation on multilabel classification

I'm using Tensorflow for an auto-tagging task on audio clips. The problem is actually a multilabel classification problem meaning that each clip can have multiple tags at the same time. Regarding ...
3
votes
1answer
53 views

Transfer Learning for CNNs and Batch Norm Layers

In some transfer learning models, we set the training argument to False to maintain the pre-trained values of Batch Normalization for example, but the ...
3
votes
0answers
29 views

AlexNet Research Paper VS PytTorch and Tensorflow implementation

I'm making my way through Deep Learning research papers, starting with AlexNet, and I found differences in the implementation of PyTorch and Tensorflow that I can't explain. In the research paper, ...
3
votes
2answers
72 views

Keras OOM for data validation using GPU

I'm trying to run a deep model using GPU and seems Keras running the validation against the whole validation data set in one batch instead of validating in many batches and that's causing out of ...
3
votes
1answer
91 views

Transfer Learning Question: Extending the Functionality of a Multipose-Estimation Machine Learning Model?

I have experimented with a number of different machine learning models used for pose estimation. Most of them output a heatmap and offsets for the detected person(s) in the image. I really like the ...
3
votes
1answer
94 views

tensorflow pseudo inverse doesn't work for complex matrices!

The Tensorflow documentation here says that: tf.linalg.pinv is ''analogous to numpy.linalg.pinv. It differs only in default value of rcond''. However, tf.linalg.pinv requires the matrix to ...
3
votes
0answers
27 views

How to encode multiple inputs and multiple outputs

I have a piece of math more complicated than I can understand at the moment, a dynamic graph visualization. It uses a physics metaphor of springs and magnets, where the vertices act as magnets ...
3
votes
0answers
43 views

Terrible Tensorflow performance on powerful production server

Background I am building a simple face detection API with Python, Flask and the MTCNN face detector. My problem is that the model and API are running really quickly (batch of 100 images takes 0.5-0....
3
votes
2answers
353 views

Keypoint detection from an image using a neural network

I am trying to design and train a neural network, which would be able to give me coordinates of certain key points in the image. Dataset I've got a dataset containing 1800 images similar to these: ...
3
votes
1answer
2k views

Making predictions / Loading model in TensorFlow 2.0

I use TensorFlow/Keras on a daily basis to make predictions for a project. Everything works fine but I was getting regular warnings about the transition to TensorFlow 2.0 and I thought this week I ...
3
votes
0answers
1k views

SymbolicException: Inputs to eager execution function cannot be Keras symbolic tensors

I am writing Encoder-Decoder architecture with Bahdanau Attention using tf.keras with TensorFlow 2.0. Below is my code This is working with TensorFlow 1.15 but getting the error in 2.0. you can check ...
3
votes
0answers
3k views

Keras - Implementation of custom loss function with multiple outputs

I am trying to replicate (a way smaller version) of the AlphaGo Zero system. However, in the network model, I am having a problem. The loss function I am supposed to implement is the following: $$l = ...
3
votes
1answer
734 views

Running out of memory when training Keras LSTM model for binary classification on image sequences

I'm trying to come up with a Keras model based on LSTM layers that would do binary classification on image sequences. The input data has the following shape: ...
3
votes
1answer
96 views

Softmax activation predictions not summing to 1

I am a beginner with rnns, consider this sample code ...
3
votes
1answer
420 views

How to use PCA in CNN for image recognition using Keras?

I created a CNN model for image classification and I want to use Principal Component Analysis (PCA) but when I run pca.fit() code, the code still running for hours ...
3
votes
0answers
185 views

How do I implement masking in TensorFlow eager execution?

I am training a stateful RNN on variable length sequences (optional: see my previous question for more details). I padded the sequences to a fixed length with the value -1. The when batches are ...
3
votes
0answers
612 views

Deep Reinforcement Learning for dynamic pricing

I am trying to implement a Deep Q Network model for Dynamic pricing in Logistics. I can define State Space (Origin, Destination, type of the shipment, customer, Type of the product, Commodity of the ...
3
votes
0answers
220 views

Kronecker product using sparse matrices / tensors in tensorflow

I am currently trying to perform a kronecker product on a pair of sparse tensors in tensorflow. I have found some code on another thread to perform the kronecker product using normal tensors. ...
3
votes
2answers
1k views

Gradient of NN output with respect to inputs

I've trained a neural network (NN) on a problem where multiple inputs can be mapped to the same output. I'd like to use this NN to go from an output to an input i.e. given an output vector $y$, I want ...
3
votes
1answer
2k views

ValueError: Numpy arrays that you are passing to your model is not the size the model expected

I am trying to perform concatenation on the Bidirectinal LSTM layer. I have my model defined like this: ...
3
votes
0answers
927 views

Cross validation for convolutional neural network

I am using Keras to create a CNN model, and I would to use K-fold cross-validation to train the dataset. The dataset contains images and I am using ...
3
votes
0answers
164 views

Genarate one hour time interval array using pandas in python (import from csv) to predict next value

I am trying to generate one hour one hour time interval to predict next value according to my data set imported from csv file. Here according to the time it will give outputs include in x column. This ...
3
votes
0answers
965 views

Multivariate, multistep forecasting with LSTM

I want to use an RNN with LSTM to forecast multiple steps into the future, based on multiple inputs. I have some ideas for different ways to approach this, but I'm afraid I'm missing the "right way" ...
3
votes
1answer
1k views

Overfitting in CNN

I am training a VGG net on STL-10 dataset I am getting Top-5 validation accuracy about 98% and Top-1 validation accuracy about 83% But both the Top-1 and Top-5 Training accuracy is reaching 100% ...
3
votes
0answers
648 views

Why Tensorflow does NOT quit when CUDA_ERROR_OUT_OF_MEMORY

It was my understanding that when trying to create a tensorflow session, if the amount of available GPU memory is not enough for what the program asks for, the program should raise an error and exit. ...
3
votes
0answers
482 views

Keras - Masking CNNs

I have a 3D tensor on which I apply 2D convolutions. Sometimes, this 3D is padded both in width and height to have a fixed size. How could I apply masking (like with RNNs) so that the gradients ...
3
votes
0answers
5k views

Custom layer in keras with multiple input and multiple output

I have implemented a custom layer in keras which takes in multiple input and also results to multiple output shape. My code goes as below: ...
3
votes
0answers
851 views

Help with the following error: Variable already exists, disallowed. Did you mean to set reuse=True in VarScope?

I am not sure how to handle this error. This is from an RNN tutorial found here. I vaguely understand that the variables need to be able to be reused, but I don't know how to implement this fix. ...
3
votes
0answers
194 views

Connect output node to next hidden node in RNN

I'm trying to build a neural network with an unconventional architecture and a having trouble figuring out how. Usually we have connections like so, where $X=$ input, $H=$ hidden layer, $Y=$ output ...
3
votes
0answers
2k views

Data Augmentation in Tensorflow

I am trying to replicate a network for facial key point detection like in the following link Daniel Nouri's Blog on KFKD. The blog uses Lasagne but i am trying to do using Tensorflow. I am unable to ...
3
votes
2answers
462 views

how to calculate quadratic features in computer vision Neural Network

I am recently watching some tutorials for deep learning from Dr Andrew Ng on Youtube. Link is hereThe Youtube video There is a concept of number of features in convolutional neural network in ...
3
votes
0answers
302 views

TensorFlow doesn't learn when input=output (or probably I am missing something)

I have used TensorFlow before for training a model to recognize images (something similar to this example: https://github.com/tensorflow/models/tree/master/inception). I was trying to do something ...
3
votes
0answers
5k views

Adding multilabel classifier to TensorFlow example

I am starting with the generic TensorFlow example. To classify my data I need to use multiple labels (ideally multiple softmax classifiers) on the final layer, ...
3
votes
1answer
516 views

What does it mean that classes are mutually exlcusive but soft-labels are accepeted?

The Tensorflow's documentation of softmax_cross_entropy_with_logits: Measures the probability error in discrete classification tasks in which the classes are mutually exclusive (each entry is in ...
2
votes
0answers
42 views
2
votes
0answers
25 views

Keras deep learning speaker identification model excels during training and then fails predictions

I am attempting to create a 1:N speaker identification model with Keras using a TensorFlow backend. I used the LibriSpeech corpus for training data, and preprocessed the data by first converting each ...
2
votes
0answers
34 views

Streaming sequence detection (Binary Classification) LSTM/GRU

I am currently trying to implement a model which can detect a specific sequence according to the training data which looks like the following: ...
2
votes
2answers
40 views

Neural network regression problem, integer output neuron constraint

The problem I'm solving is a regression problem using neural networks, and the "y" value covers a very large range (let's say y represents the number of people, ranging from 0 people to 10000 people), ...
2
votes
0answers
45 views

PyTorch equivalent of tf.Data

I've created a pipeline using tf.Data (or more accurately a mix of Pandas and then tf.Data). ...
2
votes
0answers
60 views

Sudden drop of score in the last few episodes

I was following this tutorial about lunar lander and deep Q learning with Tensorflow 2 and I noticed something odd. The problem was actually solved at episode 476 but then the score went from 259.90 ...
2
votes
1answer
181 views

Error when trying Transfer Learning

I'm trying to train a model which is an extension of Google's Inception-V3 for the purpose of recognizing and classifying whether there is any pneumonia using x-ray images. I've used Tensorflow-Hub ...

1
2 3 4 5
15