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
111
votes
5answers
128k 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 ...
48
votes
4answers
45k 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 "...
32
votes
3answers
31k views

Multi GPU in keras

How do you 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 ...
30
votes
3answers
18k views

Intuitive explanation of Noise Contrastive Estimation (NCE) loss?

I read about NCE (a form of candidate sampling) from these two sources: Tensorflow writeup Original Paper Can someone help me with the following: A simple explanation of how NCE works (I found the ...
26
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 ...
23
votes
2answers
24k views

Merging two different models in Keras

I am trying to merge two Keras models into a single model and I am unable to accomplish this. For example in the attached Figure, I would like to fetch the middle layer $A2$ of dimension 8, and use ...
20
votes
3answers
26k 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 ...
20
votes
2answers
9k views

Choosing between TensorFlow or Theano as backend for Keras

Keras supports both TensorFlow and Theano as backend: what are the pros/cons of choosing one versus the other, besides the fact that currently not all operations are implemented with the TensorFlow ...
19
votes
3answers
17k 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 ...
18
votes
1answer
19k views

How to deal with string labels in multi-class classification with keras?

I am newbie on machine learning and keras and now working a multi-class image classification problem using keras. The input is tagged image. After some pre-processing, the training data is represented ...
17
votes
4answers
24k views

Using TensorFlow with Intel GPU

I am a newbie in deep learning. Is there any way now to use TensorFlow with Intel GPUs? If yes, please point me in the right direction. If not, please let me know which framework, if any, (Keras, ...
16
votes
5answers
381 views

What more does TensorFlow offer to keras?

I'm aware that keras serves as a high-level interface to TensorFlow. But it seems to me that keras can do many functionalities on its own (data input, model creation, training, evaluation). ...
16
votes
3answers
33k 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 ...
16
votes
3answers
9k views

What is the meaning of “The number of units in the LSTM cell”?

From Tensorflow code: Tensorflow. RnnCell. num_units: int, The number of units in the LSTM cell. Can't undestand what does this mean. What are the units of LSTM ...
16
votes
1answer
3k views

Keras vs. tf.keras

I'm a bit confused in choosing between Keras (keras-team/keras) and tf.keras (tensorflow/tensorflow/python/keras/) for my new research project. There is a debate that Keras isn't owned by anyone, so ...
16
votes
3answers
9k views

How to calculate the mini-batch memory impact when training deep learning models?

I'm trying to calculate the amount of memory needed by a GPU to train my model based on this notes from Andrej Karphaty: http://cs231n.github.io/convolutional-networks/#computational-considerations ...
15
votes
4answers
8k views

What is the benefit of splitting tfrecord file into shards?

I'm working on speech recognition with Tensorflow and plan to train LSTM NN with massive waves dataset. Because of the performance gains, I plan to use tfrecords. There are several examples on ...
14
votes
1answer
2k views

PyTorch vs. Tensorflow eager

Google recently included in tensorflow's nightly builds its Eager mode, an imperative API to access tensorflow computation capabilities. How do tensorflow eager compare to PyTorch? Some aspects that ...
13
votes
1answer
2k 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 ...
12
votes
2answers
9k views

What is one hot encoding in tensorflow?

I am currently doing a course in tensorflow in which they used tf.one_hot(indices, depth). Now I don't understand how these indices change into that binary sequence. Can somebody please explain to ...
12
votes
4answers
13k views

Detecting anomalies with neural network

I have a large multi dimensional dataset that is generated each day. What would be a good approach to detect any kind of 'anomaly' as compared with previous days? Is this a suitable problem that ...
11
votes
1answer
11k views

Tensorflow neural network TypeError: Fetch argument has invalid type

I am making a simple neural network using tensorflow, with data I collected myself, however, it's not cooperating :P I have run into an error that I can't fix or find the fix for and I would love your ...
11
votes
1answer
17k 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: ...
11
votes
3answers
9k views

Tensorflow Adjusting Cost Function for Imbalanced Data

I have a classification problem with highly imbalanced data. I have read that over and undersampling as well as changing the cost for underrepresented categorical outputs will lead to better fitting. ...
11
votes
1answer
5k views

Train on batches in Tensorflow

I'm currently trying to train a model on a large csv file (>70GB with more than 60 million rows). To do so I'm using tf.contrib.learn.read_batch_examples. I'm struggling in understanding how this ...
10
votes
1answer
12k views

Make Keras run on multi-machine multi-core cpu system

I'm working on Seq2Seq model using LSTM from Keras (using Theano background) and I would like to parallelize the processes, because even few MBs of data need several hours for training. It is clear ...
10
votes
2answers
5k views

Trying to use TensorFlow to predict financial time series data

I'm new to ML and TensorFlow (I started about a few hours ago), and I'm trying to use it to predict the next few data points in a time series. I'm taking my input and doing this with it: ...
9
votes
2answers
2k views

Should use sklearn or tensorflow for neural networks?

I have just started learning Neural Networks for deep learning from cs231. I am trying to implement Neural Network in Python. I am looking at using Tensorflow or scikit-learn. What are some pros and ...
9
votes
1answer
2k views

Why TensorFlow can't fit simple linear model if I am minimizing absolute mean error instead of the mean squared error?

In Introduction I have just changed loss = tf.reduce_mean(tf.square(y - y_data)) to ...
9
votes
2answers
7k views

Why is learning rate causing my neural network's weights to skyrocket?

I am using tensorflow to write simple neural networks for a bit of research and I have had many problems with 'nan' weights while training. I tried many different solutions like changing the optimizer,...
9
votes
2answers
765 views

Memory error when using more layers in CNN model

On my dell core i7 - 16GB RAM - 4gb 960m GPU laptop, I am working on a project to the classify lung CT images using 3d CNN. I'm using the CPU version of tensorflow. The images are prepared as numpy ...
9
votes
1answer
400 views

Why does my Keras model learn to recognize the background?

I'm trying to train this Keras implementation of Deeplabv3+ on Pascal VOC2012, using the pretrained model (which was also trained on that dataset). I got weird results with the accuracy quickly ...
8
votes
3answers
16k views

How to do batch inner product in Tensorflow?

I have two tensor a:[batch_size, dim] b:[batch_size, dim]. I want to do inner product for every pair in the batch, generating <...
8
votes
1answer
157 views

data augmentation when using flow_from_directory in CNN

I want to use a small dataset to create CNN model. So, I am using data augmentation to increase the train dataset. Should I use all augmentation techniques (arguments) that listed here? I have ...
8
votes
1answer
952 views

Machine Learning: Writing Poems

I'm a student of machine learning, and these days I was trying to learn how to use the TensorFlow library. I've gone through various tutorials and trial&errors with tensorflow, and I thought the ...
7
votes
2answers
10k views

Does Tensorflow support a Decision Tree Classifier?

I am trying to implement decision tree classifier to classify my data set. I am using Python. Now it is easy to implement in scikit learn, but how can I implement this in tensorflow.
7
votes
2answers
8k views

Clustering high dimensional data

TL;DR: Given a big image dataset (around 36 GiB of raw pixels) of unlabeled data, how can I cluster the images (based on the pixel values) without knowing the number of clusters ...
7
votes
3answers
3k 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 ...
7
votes
1answer
6k 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 ...
7
votes
3answers
44k 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 ...
7
votes
3answers
1k views

Any pytorch tools to monitor neural network's training?

Are there any tools to monitor network's training in PyTorch? I am looking for an equivalent to tensorboard in tensorflow.
7
votes
1answer
2k views

How to pass features extracted using CNN into RNN?

I have word images as below: Let's say it's a 256x64 image. My aim is to extract the text from the image as 73791096754314441539...
7
votes
1answer
4k views

What is a tower?

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

How to user Keras's Embedding Layer properly?

I'm a bit confused the proper usage of Embedding layer in Keras for seq2seq purpose (I'd like to reconstruct the TensorFlow se2seq machine translation tutorial in Keras). My questions are the ...
6
votes
2answers
19k 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 ...
6
votes
4answers
1k 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?
6
votes
2answers
16k views

What is the best hardware/GPU for deep learning? [closed]

What is the best GPU for deep learning currently available on the market? I've heard that Titan X Pascal from NVidia might be the most powerful GPU available at the moment, but would be interesting ...
6
votes
4answers
621 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
3answers
25k views

How to use lists in Tensorflow?

I have a number of lists, such as [1,2,3,4], [2,3,4], [1,2], [2,3,4,6,8,10], whose lengths are obviously unsame. How can I use this as input of placeholder in Tensorflow? As I have tried, the ...
6
votes
4answers
11k views

how to calculate the output shape of conv2d_transpose?

Currently I code a GAN to generate MNIST numbers but the generator doesnt want to work. First I choose z with shape 100 per Batch, put into a layer to get into the shape (7,7, 256). Then ...