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.

Filter by
Sorted by
Tagged with
136
votes
5answers
152k views

The cross-entropy error function in neural networks

In the MNIST For ML Beginners they define cross-entropy as $$H_{y'} (y) := - \sum_{i} y_{i}' \log (y_i)$$ $y_i$ is the predicted probability value for class $i$ and $y_i'$ is the true probability ...
12
votes
3answers
8k views

What is the relationship between the accuracy and the loss in deep learning?

I have created three different models using deep learning for multi-class classification and each model gave me a different accuracy and loss value. The results of the testing model as the following: ...
6
votes
4answers
669 views

What are the possible ways to detect skin while classifying diseases?

I am working on a skin disease classification problem where I have successfully created a classifier ( TensorFlow + Keras ) which can classify images of two skin diseases. The sample image needs to ...
6
votes
1answer
5k views

Keras: How to normalize dataframe with continuous and categorical data?

I have a dataframe with about 50 columns. The columns are either categorical or continuous data. The continuous data can be between 0.000001-1.00000 or they can be between 500,000-5,000,000. The ...
6
votes
1answer
3k views

Keras CNN with low/constant accuracies

I am dealing with the Street View House Number recognition problem. I am trying to train a CNN with Keras. Here is how I prepared the input: ...
3
votes
5answers
2k views

Applying a keras model working with greyscale images to RGB images

I followed this basic classification TensorFlow tutorial using the Fashion MNIST dataset. The training set contains 60,000 28x28 pixels greyscale images, split into 10 classes (trouser, pullover, shoe,...
1
vote
2answers
90 views

How to improve accuracy in the following code?

I have the about 43 different categories of traffic signs images data. If I am using the small data of 3 categories the maximum accuracy I am getting is around 65% and I have tried a lot of different ...
58
votes
5answers
49k views

Neural networks: which cost function to use?

I am using TensorFlow for experiments mainly with neural networks. Although I have done quite some experiments (XOR-Problem, MNIST, some Regression stuff, ...) now, I struggle with choosing the "...
39
votes
3answers
49k views

Multi GPU in keras

How we can program in the keras library (or tensorflow) to partition training on multiple GPUs? Let's say that you are in an Amazon ec2 instance that has 8 GPU's and you would like to use all of them ...
27
votes
3answers
40k views

Neural Network for Multiple Output Regression

I have a dataset containing 34 input columns and 8 output columns. One way to solve the problem is to take the 34 inputs and build individual regression model for each output column. I am wondering ...
22
votes
3answers
21k views

Keyword/phrase extraction from Text using Deep Learning libraries

Perhaps this is too broad, but I am looking for references on how to use deep learning in a text summarization task. I have already implemented text summarization using standard word-frequency ...
27
votes
1answer
9k views

PyTorch vs. Tensorflow Fold

Both PyTorch and Tensorflow Fold are deep learning frameworks meant to deal with situations where the input data has non-uniform length or dimensions (that is, situations where dynamic graphs are ...
25
votes
3answers
47k views

What is weight and bias in deep learning?

I'm starting to learn Machine learning from Tensorflow website. I have developed a very very rudimentary understanding of the flow a deep learning program follows (this method makes me learn fast ...
19
votes
1answer
4k views

How to add non-image features along side images as the input of CNNs

I'm training a convolutional neural network to classify images on fog conditions (3 classes). However, for each of about 150.000 images I also have four meteorological variables available that might ...
13
votes
7answers
6k views

Why does Keras need TensorFlow as backend?

Why does Keras need the TensorFlow engine? I am not getting correct directions on why we need Keras. We can use TensorFlow to build a neural network model, but why do most people use Keras with ...
14
votes
1answer
27k views

How to define a custom performance metric in Keras?

I tried to define a custom metric fuction (F1-Score) in Keras (Tensorflow backend) according to the following: ...
9
votes
3answers
57k views

Switching Keras backend Tensorflow to GPU

I use Keras-Tensorflow combo installed with CPU option (it was said to be more robust), but now I'd like to try it with GPU-version. Is there a convenient way to switch? Or shall I re-install fully ...
12
votes
2answers
30k views

Custom loss function with additional parameter in Keras

I'm looking for a way to create a loss function that looks like this: The function should then maximize for the reward. Is this possible to achieve in Keras? Any suggestions how this can be achieved ...
9
votes
2answers
10k views

Tensorflow regression model giving same prediction every time

...
7
votes
1answer
8k views

Neural network with flexible number of inputs?

Is it possible to create a neural network which provides a consistent output given that the input can be in different length vectors? I am currently in a situation where I have sampled a lot of audio ...
6
votes
1answer
4k views

The model of LSTM with more than one unit

In stacked LSTM, for example: 2 LSTM layers, LSTM_1 in order to pass the output of every time step to LSTM_2, so it needs to return hidden state value in every time step, like the architecture I drew ...
1
vote
3answers
5k views

Predict sinus with keras feed forward neural network

I have a very simple feed forward neural network with keras that should learn a sinus. Why is the predictive power so bad and what is generally the best way to pinpoint issues with a network? In the ...
11
votes
2answers
8k views

K-fold cross validation when using fit_generator and flow_from_directory() in Keras

I am using flow_from_directory() and fit_generator in my deep learning model, and I want to use cross validation method to train ...
6
votes
2answers
8k views

What are the consequences of not freezing layers in transfer learning?

I am trying to fine tune some code from a Kaggle kernel. The model uses pretrained VGG16 weights (via 'imagenet') for transfer learning. However, I notice there is no layer freezing of layers as is ...
10
votes
1answer
4k views

What is a tower?

In many tensorflow tutorials (example) "towers" are mentioned without a definition. What is meant by that?
9
votes
3answers
5k views

Difference between indicator column and categorical identity column in tensorflow

I am learning Tensorflow and came across different feature columns used in Tensorflow . Out of these types, two are categorical_identity_column and ...
6
votes
4answers
2k views

Why choose TensorFlow?

I have noticed that most of the deep learning developers use TensorFlow. So why choose TensorFlow? What is the advantage of TensorFlow over Theano and CNTK?
5
votes
1answer
4k views

Keras negative sampling with custom layer

I am trying to implement negative sampling in Keras. I wrote the following code that just compute the loss and I plan to add an additional output for the logits once I get it up and running. Here is ...
4
votes
2answers
6k views

What is the shape of conv3d and conv3d_transpose?

I want to do a GAN with coloured pictures. This means I need a three dimensional input and therefore I like to use conv3d and conv3d_transpose. Unfortunately in the TensorFlow documentation, I can't ...
4
votes
2answers
4k views

Is it possible using tensorflow to create a neural network that maps a certain input to a certain output?

I am currently playing with tensorflow, but can't seem to get a hold whether it usefull for my problem? I need to create a neural network, that is capable of mapping input to output. The way things ...
2
votes
1answer
3k views

How to create a multi-dimensional softmax output in Tensorflow?

I came across this research paper released by YouTube, on how they use deep learning neural networks for recommendations. It's located here: https://static.googleusercontent.com/media/research.google....
6
votes
1answer
2k views

What is the difference between a Categorical Column and a Dense Column?

In Tensorflow, there are 9 different feature columns, arranged into three groups: categorical, dense and hybrid. From reading the guide, I understand categorical columns are used to represent ...
3
votes
1answer
7k views

autoencoder for features selection [closed]

I m using a data set with 41 features numerics and nominals the 42 one is the class (normal or not) first I changed all the nominals features to numeric since the autoencoder requires that the imput ...
3
votes
1answer
2k views

in TensorFlow 2.0, what is the different between LSTM and LSTMCell objects?

I am trying to implement an RNN in TensorFlow 2.0 (beta1). Looking at the layer functions (inherited from Keras) I found: tf.keras.layers.LSTM and ...
3
votes
0answers
1k 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" ...
2
votes
3answers
149 views

Tensorflow classification - maximize the accuracy of certain classes

I'm doing some experimentation and trying to train a forex trading model to classify based on three classes: Buy Sell No action Input rows are labeled as buy when ...
2
votes
2answers
2k views

Adding hand-crafted features to a convolutional neural network (CNN) in TensorFlow

Let's say I want to add a few hand-crafted features to a convolutional neural network CNN in TensorFlow. The CNN can be a simple one as described here. Naturally I'd like to add these features right ...
1
vote
1answer
987 views

How to arrange the image dataset in CNN?

How do I arrange the image dataset in CNN? Should I put each image category in a separate folder? Or all of them in the same folder? Should the image name be the category name? I would like to see an ...
1
vote
1answer
3k views

How can I load file from my local drive in keras using get_file?

I am using google colab and I need to load data from my local drive. How I can do that using get_file? what should be the origin?
1
vote
1answer
2k views

Build knowledge bot using deep learning

I'm going through this chatbot example, which uses the Cornell movie dialog corpus. Expanding this example, is it possible to build a "knowledge bot" (ie) a bot that can chat and be knowledgeable in a ...
0
votes
0answers
13 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 ...
0
votes
1answer
3k views

Multiclass Classification on live sensor data

I want to use an accelerometer to detect which way a train is heading. You could do this by just setting thresholds manually to detect the direction of acceleration on the x-axis (which would be ...
5
votes
1answer
11k views

How to convert my tensorflow model to pytorch model? [closed]

I performed transfer learning using ssd + mobilenet as my base model in tensorflow and freezed a new model. Now I want to convert that model into pytorch. Is there any way how I can achieve it? Any ...
5
votes
1answer
852 views

How to design batches in a stateful RNN

I am using TF Eager to train a stateful RNN (GRU). I have several variable length time sequences about 1 minute long which I split into windows of length 1s. In TF Eager, like in Keras, if ...
4
votes
1answer
7k views

TensorFlow: number of channels of conv1d filter

I want to apply a ConvNet on my one dimensional data retrieved from 13 sensors. So, each of my samples consists of 13 channels (of 51 values) I am using 'conv1d' ...
4
votes
3answers
2k views

0.1 accuracy on MNIST fashion dataset following official Tensorflow/Keras tutorial

My goal is to classify products pictures into categories such as dress, sandals, etc. I am using the MNIST fashion dataset, following this official tutorial word-per-word: https://www.tensorflow.org/...
4
votes
1answer
742 views

Tensorflow: how to look up and average a different amount of embedding vectors per training instance, with multiple training instances per minibatch?

In a recommender system setting: let's say I want to learn to predict future item purchases based on user past purchases using an approach inspired by Youtube's recommender system: Concretely, let's ...
3
votes
2answers
2k views

When to use different Word2Vec training approaches?

So I am learning Word2Vec for the first time and my question is quite basic: How to know what approach to use? I.e, Word2Vec in Tensorflow or Word2Vec trained with Gensim ? In what cases would ...
2
votes
1answer
885 views

How to use TimeDistributed fo CNN+LSTM?

I am trying to classify 6 classes time-frequency domain signal (STFT spectrogram) with a size of 3601x217 pixels. Assume that for each classes have 70 training samples, 20 validation samples, and 10 ...
2
votes
1answer
326 views

Prediction on timeseries data using tensorflow

I have an input and output of below format: (X) = [[ 0 1 2] [ 1 2 3]] y = [ 3 4 ] It's timeseries data. The task is to predict the next number....