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
4
votes
1answer
2k views

Are CNNs best approaches to find and count objects in images?

I'm starting my first real data-science project, I made a reserach and want to ask if my approach is correct: I HAVE: 600 photos of electronic components, hundreds of components in a single ...
4
votes
1answer
802 views

combining trained neural nets in tensorflow

I am using tensorflow to train two instances of the same neural network with two different datasets. the network itself is quite simple with an input and output layer and 6 hidden layers (each layer ...
4
votes
2answers
5k views

Backpropagation Through Time (BPTT) of LSTM

I am currently trying to understand the BPTT for Long Short Term Memory (LSTM) in TensorFlow. I get that the parameter num_steps is used for the range that the RNN ...
4
votes
2answers
3k views

Tensorflow - How to set gradient of an external process (py_func)?

I'm computing and optimization of some Variables that are used on an external process, but I get the error "No Gradient". A heavily simplified (not tested) version of the code, but you can get the ...
4
votes
1answer
898 views

Tensorflow RNN not learning when output included in training variables

I have been attempting to train a RNN on a set of time series data. The goal is to predict one of six categorical outputs. The input is given as 5 time steps of 14 inputs, six of which at one-hot ...
4
votes
1answer
574 views

Word labeling with Tensorflow

A part of our system does a limited rule-based word labeling (kinda WSD). Basically it takes a dependency tree of a sentence, finds words or POS tags of interest and assigns to each a label/sense ...
4
votes
0answers
163 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
425 views

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

My programme gives the following error message: ...
4
votes
1answer
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 = ...
4
votes
0answers
172 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
323 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
1answer
265 views

Transfer learning by concatenating the last classification layer

Before going into an obvious XY problem, I will explain you what I'm trying to do. I'm training a simple MobileNet pre-trained with Imagenet for multiclass classification. What I do is freeze all the ...
4
votes
0answers
283 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
1answer
681 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
6k 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
5answers
1k 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,...
3
votes
1answer
8k views

Basic Time Series Classification Examples [closed]

I've been using matlab until now to classify a large number of labelled time series I have. This has been relatively successful but I'd like to try using Tensorflow to apply a Deep Learning paradigm ...
3
votes
2answers
2k views

Are mini batches sampled randomly in Keras' Sequential.fit method()

When you .fit a Keras Sequential() model, you can specify a batch_size parameter. I have ...
3
votes
3answers
3k views

My Keras bidirectional LSTM model is giving terrible predictions

I am trying to predict velocity (dynamics) values for notes that make up a piece of music using a bi-directional LSTM, following this blog post pretty closely: http://imanmalik.com/cs/2017/06/05/...
3
votes
2answers
12k views

How to improve my test accuracy using CNN in Tensorflow

I'm working on a Dogs vs. Cats Redux: Kernels Edition project from Kaggle and I'm new for this area. So far, I couldn't be able to improve my test rate over %50. I'm wondering what can i do to improve ...
3
votes
1answer
29 views

How to supress previous results in a generative network?

Think of a generative network generating animal names. It's been trained on a set of animal names so this shouldn't be too hard. But say I want to generate 10 animal names. First I run the network ...
3
votes
2answers
165 views

Why can we not split train test data with 0.01 as parameter or 99% training data

Most of the blogs mention about a good thumb rule to be 80-20 split for the train and test respectively. My special case is a time series dataset and it is for the stock prices, which IMO is very ...
3
votes
2answers
1k views

Tensorflow 2 eager vs graph mode

I've been working through the tensorflow-2.0.0 beta tutorials. In the advanced example a tensorflow.keras subclass is used. The presence of the ...
3
votes
1answer
5k views

Creating a Object Detection model from scratch using Keras

I have a dataset containing 330 images which contain guns. Along with the images, I have a text file associated with each image file which contains, The number of objects ( guns ) in the image. ...
3
votes
2answers
206 views

How do I use keras NN to classify data after training?

I have defined, trained and saved my tensor keras NN. Now that that is complete how do I use it output classifications to non training data? ...
3
votes
2answers
602 views

Tensorflow (or Keras) vs. Pytorch vs. some other ML library for implementing a CNN [closed]

I am looking into implementing a convolutional neural network for a research problem. I've heard of deep learning libraries like Pytorch and Tensorflow and was hoping to get some additional ...
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 ...
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
2answers
6k views

Why i get OOM error although my model is not that large?

I am a newbie in GPU based training and Deep learning models. I am running cDCGAN (Conditonal DCGAN) in tensorflow on my 2 Nvidia GTX 1080 GPU's. My data-set consists of around 32,0000 images with ...
3
votes
2answers
577 views

How to use a NN architecture that is too big for GPU?

Initially posted in Stack Overflow. I would like to implement a model which is actually 2 neural networks stacked together. However the size of these 2 architecture is too big to fit in GPU at the ...
3
votes
1answer
104 views

Can I use fit() function with images in Keras?

I want to use vgg16 to train a dataset that contains images. Can I use fit() function instead of fit_generator() in Keras? How?...
3
votes
2answers
210 views

which NN should I use for Time-series dataset, whose pattern change as time goes

I am analyzing a time-series dataset using (supervised) tensorflow deep learning. The tensorflow code is given a series of inputs, and based on each input, the NN has to predict output value in near ...
3
votes
2answers
3k views

Is it possible to integrate Keras and TensorFlow code?

I want to use the pre-trained VGG16 model of Keras, along with another TensorFlow model. I want to take the output from one of the layers of VGG16 in Keras, put it into the TensorFlow model and train ...
3
votes
2answers
940 views

Softmax: Different output scikit-learn and TensorFlow

I'm trying to learn a simple linear softmax model on some data. The LogisticRegression in scikit-learn seems to work fine, and now I am trying to port the code to TensorFlow, but I'm not getting the ...
3
votes
1answer
854 views

Evaluating Logistic Regression Model in Tensorflow

Following this tutorial, I have a doubt about the evaluation part in: ...
3
votes
3answers
2k views

Keras: X and Y are the same, yet validation accuracy is 50%, what is wrong?

I am trying to understand what is going on so I built a simpler version of my project. I set the X and the Y to be identical and I'm trying to predict Y using X, this should be very simple, but my ...
3
votes
1answer
260 views

In Tensorflow, What kind of neural network should I use?

I am doing Tensorflow tutorial, getting what TF is. But I am confused about what neural network should I use in my work. I am looking at Single Layer Neural Network, CNN, RNN, and LSTM RNN. ----------...
3
votes
1answer
170 views

Communication between Keras and Backend like Tensorflow, Theano

Keras is a high level neural network API providing python library which uses tensor flow or theano or cntk as backend. What are the primary roles of backend libraries? Is it implementation? or Is it ...
3
votes
4answers
5k views

How to compute f1 in tensorflow

I have code that computes the accuracy, but now I would like to compute the f1 score. ...
3
votes
1answer
279 views

Why doesn't loss go down during Neural Net training?

I am working on a Kaggle competition and have tried 2 different code approaches and have the same issue: the loss is large (18247478709991652.0000) and does not go down or is nan. I'm not sure if ...
3
votes
1answer
303 views

How to check two images(one is original image and other one captured by mobile) similarity using deep learning?

My problem statement is - In my project, original image of product is stored in database. Now whenever any person uploading that product's camera pic(for internal audit process) then I need to verify ...
3
votes
1answer
548 views

Understanding the training phase of the tutorial “Using Keras and Deep Deterministic Policy Gradient to play TORCS” tutorial

I am trying to understand the training phase of the tutorial Using Keras and Deep Deterministic Policy Gradient to play TORCS (mirror, code) by Ben Lau published on October 11, 2016. The tutorial ...
3
votes
1answer
36 views

Why are the weights of my first layer and last layer in the CNN change while the middle layers don't?

The weights of my first and last convolution layers do change in a noticeable way. However, the rest of my convolution layers, in the middle, do not. I should add that all convolution layers' biases ...
3
votes
1answer
117 views

Why is my validation loss going up while my validation accuracy also goes up?

Scenario: I've been training a CNN for the cifar10 dataset. I'm using tensorflow, and a CNN with 12 conv layers and 1 dense layer before a softmax dense layer. I'm using data augmentation as well ...
3
votes
1answer
495 views

TensorFlow / Keras: What is stateful = True in LSTM layers?

Could you elaborate on this argument? I found the brief explanation from the docs unsatisfying: stateful: Boolean (default False). If True, the last state for each sample at index i in a batch will ...
3
votes
1answer
1k views

Confused about steps_per_epoch and validation_steps in Keras

According to the documentation in TF 2: ...
3
votes
1answer
205 views

Choosing the size of Character Embedding for Language Generation models

I am working on a character-based Language Generator, loosely based on this tutorial on the TensorFlow 2.0 website. Following the example, I am using an Embedding() ...
3
votes
1answer
2k views

TF tells me to use Keras optimizer, tells me the opposite when I change it?

I have this piece of code: ...
3
votes
3answers
5k views

Keras' 'normal' LSTM uses the GPU?

I'm running Keras' LSTM (not CuDNNLSTM) but I notice my GPU is under load. I need recurrent dropout, so I can only stick with <...

1 2 3
4
5
32