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
5
votes
1answer
287 views

Data augmentation parameters

When I use data augmentation to increase the train dataset, should I use all augmentation techniques (parameters in keras)? Which data augmentation parameters should use with flow_from_directory?
5
votes
1answer
4k views

What is the difference between tensorflow saved_model.pb and frozen_inference_graph.pb?

I've re-trained a model (following this tutorial) from the google's object detection zoo (ssd_inception_v2_coco) on a WIDER Faces Dataset and it seems to work if I use ...
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 ...
5
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 ...
5
votes
2answers
6k views

Time series forecasting with RNN(stateful LSTM) produces constant values

I have a time series daily data for about 6 years(1.8k data points). I am trying to forecast the next t+30 values, Train data independent matrix (X)=Sequences of previous 30 day values Train (Y)=The ...
5
votes
2answers
7k views

How to split a keras model into submodels after it's created

The following piece of code should compile if you have the dependencies installed: ...
5
votes
2answers
1k views

Tensorflow oscillating Test and Train Accuracy?

I have implemented a CNN with images as input and 101 classes as output. I have applied mean subtraction and normalization to the input before giving it as input to the network. I have also ...
5
votes
3answers
111 views

Scaling neural networks

While using Neural Networks (TensorFlow: Deep Neural Regressor), when increasing your training data size from a sample to the whole data (say a 10x larger dataset), what changes should you make to the ...
5
votes
1answer
2k views

What does SpatialDropout1D() do to output of Embedding() in Keras?

Keras model looks like this ...
5
votes
1answer
4k views

Memory error on using data generator in keras

I am using the following augmentations on dataset of size 9 GB: ...
5
votes
1answer
1k views

Understanding Tensorflow LSTM models?

I have some trouble understanding LSTM models in TensorFlow. For simplicity, let us consider the Example program. I use the tflearn as a wrapper as it does all the initialization and other higher ...
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
225 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 <...
5
votes
1answer
639 views

tensorflow in production

I am using tensorflow-serving to write a server to consume models in production. I have a question about consuming the service by clients: does tensorflow-serving support a REST API? Is there is ...
4
votes
1answer
8k views

Full Doc2Vec Implementation/Repdoduction in TensorFlow?

I'm looking to reproduce the doc2vec, i.e. paragraph vector approach by Le & Mikolov. Is anyone aware of a full script using Tensorflow? In particular, I'm looking for a solution where the ...
4
votes
1answer
135 views

Estimating Titan X graphics card impact on performance

I'm currently training CNNs using Tensorflow (Python) on my GTX 970 (specs here). I recently took a look at the new pascal based Titan Xs and I'm wondering what an estimated performance/speed gain ...
4
votes
1answer
5k views

When to use Dense, Conv1/2D, Dropout, Flatten, and all the other layers?

I have a binary classification problem and want to build a NN model which classifies the data whether class 0 or class 1. My actual implementation looks like the following: ...
4
votes
1answer
9k views

mAP scores on tensorboard (Tensorflow Object Detection API) are all 0 even though the loss value is low

I trained a faster-rcnn model on the tensorflow object detection API on a custom dataset. I found that the loss is ~2 after 3.5k steps. However, when I ran eval.py, the mAP scores are all almost 0 as ...
4
votes
1answer
2k views

Why does dropout ruin my accuracy in CNN?

I've build a CNN in Tensorflow with 2 conv layers, 1 pool layer and 2 FC layers. When I don't use dropout I get 98% accuracy on training dataset and 90% on test dataset. But, when I do use dropout, I ...
4
votes
1answer
1k views

Why is stochastic gradient descent so much worse than batch GD for MNIST task?

Here the code from Tensorflow tutorial: A Multilayer Perceptron implementation example With batch size = 100 we quickly got Accuracy: 94.59%. If I set the batch size to be one, the training takes ...
4
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 ...
4
votes
1answer
6k views

How to make two parallel convolutional neural networks in Keras?

I created two convolutional neural networks (CNN), and I want to make these networks work in parallel. Each network takes different type of images and they join in the last fully connected layer. ...
4
votes
2answers
13k views

Using K-fold cross-validation in Keras on the data of my model

I would like to use K-fold cross-validation on my data of my model. My codes in Keras 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
3answers
1k 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
4answers
14k views

Library to count number of objects in image?

I'm reading a paper on counting cells, humans, etc. Is there an off-the-shelf library for Python/Theano or TensorFlow I could use?
4
votes
2answers
105 views

Group neural networks outputs using Keras/Tensorflow

I am trying to group the outputs of my neural network, in order to have them perform a separated classification. Let's take the example where the groups are constituted of two nodes and we previously ...
4
votes
1answer
2k views

Input Pipeline for Tensorflow on GPU

The tensorflow example CIFAR10 uses input pipelines to load data from the disk to a queue. I would like to implement this for my own models, but I run into an error that I can't fix somehow. My ...
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 ...
4
votes
1answer
717 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 ...
4
votes
2answers
357 views

Loss function for multivariate regression where relationship between outputs matters

I am attempting to build a sequential model with Keras (Tensorflow backend) that has multiple outputs. My targets are proportions of a whole so each observation is an array like [0.5, 0.25, 0.15, 0.1]....
4
votes
2answers
304 views

Trained Tensorflow model performs poorly on inference

I trained an image classification model using Keras with Tensorflow backend. The model got good accuracy on validation dataset as well as on the testing data, I save the entire model to ...
4
votes
1answer
2k views

Solving an ODE using neural networks (via Tensorflow)

I'm very new to deep learning (coming from a math PDE background), but I'm trying to solve some ODEs using a neural network (via tensorflow). I've solved some simple ones like $u'(x)+u(x) = f(x)$ with ...
4
votes
2answers
853 views

Understanding LSTM input shape for keras

I am learning about the LSTM network. The input needs to be 3D. So I have a CSV file which has 9999 data with one feature only. So it is only one file. So usually it is ...
4
votes
1answer
465 views

How to implement clipping the reward in DQN in keras

How to implement clipping the reward in DQN in keras? especially how to implement clipping the reward? Is this pseudo code correct: ...
4
votes
1answer
1k views

Confusion about neural network architecture for the actor critic reinforcement learning algorithm

I am trying to understand the implementation of the actor critic reinforcement learning algorithm. According to this, there should be just one neural network with two heads for the action ...
4
votes
1answer
6k 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
2answers
5k views

how can I solve label shape problem in tensorflow when using one-hot encoding?

I used tensorflow to recognize text from natural images by using convolutional neural network; there is no specific number of characters in the text. To make a successful training I should convert the ...
4
votes
1answer
143 views

what is the loss function in char recognition using Tensorflow?

I have code in Tensorflow using convolution neural network to recognize the characters in street view Text (SVT) data. Since the label type is string, what should I use instead of ...
4
votes
1answer
5k views

Tensorflow and OpenCV real-time classification

I am testing the machine learning waters and used TS inception model to retrain the network to classify my desired objects. Initially, my predictions were run on locally stored images and I realized ...
4
votes
2answers
976 views

Public cloud GPU support for TensorFlow

I'm building convoluted neural networks with TensorFlow. I've got the latest Mac Pro, use all of my cores, and yet it still takes me several hours to train a single network. I need to do grid search ...
4
votes
1answer
397 views

How can we reduce the GPU memory usage when the model is already small enough?

I trained a model and froze it into a PB(protocol buffer) file and a directory of some variables, and the total size is about 31M. We deployed it using a GPU card and followed this answer and set the <...
4
votes
2answers
2k views

How do I create a Keras custom loss function for a one-hot-encoded binary classifier?

I have a CNN binary classifier with one-hot-encoded labels that I've written using Keras and it's just not training to the metric I want to encourage. My data is very imbalanced (91% class 0, 9% class ...
4
votes
1answer
962 views

AttributeError: type object 'Lambda' has no attribute 'shape'

I'm working on a sequence2sequence model with attention mechanism, thus I'm using an encoder-decoder architecture. The decoder part code is : ...
4
votes
2answers
1k views

How to get probabilities values with keras?

tensorflow version = '1.12.0' keras version = '2.1.6-tf' I'm using keras with tensorflow backend. I want to get the probabilities values of the prediction. I want the probabilities to sum up to 1. ...
4
votes
1answer
552 views

Theoretical and practical comparison of CTC and seq2seq loss in Tensorflow

Tensorflow has built-in implementations for both, the Connectionist Temporal Classification (CTC) loss and a special seq2seq loss (weighted cross-entropy). Since CTC loss is also intended to deal ...
4
votes
2answers
2k views

What is dilated pooling and how it works mathematically?

While I understand the concept of dilated convolution as there are lot of papers explaining about it, I have heard less about dilated pooling. Can someone explain what it is? What is the internal ...
4
votes
1answer
7k views

How to train an image dataset in TensorFlow? [closed]

As I am new to TensorFlow, I would like to do image recognition in TensorFlow using Python. For this Image Recognition I would like to train my own image dataset and test that dataset. Please answer ...
4
votes
1answer
181 views

How to determine if a neural-network has a static computation graph?

I'm looking at implementing some neural networks from research papers. However, I'm concerned about which framework I should use, because I'm uncertain if the networks form static computation graphs (...

1 2
3
4 5
32