Questions tagged [tensorflow]

16863 questions
1

votes
2

answer
395

Views

Preprocess the input data slow down the input pipeline when using Tensorflow Dataset API to read TFRecords file

I am using Tensorflow Dataset API to read TFRecords files, but the GPU usage is still low (10%). I reckon the cause is that I preprocess the data before they are fed into the sess.run(). Here is my code below. 1. Create a dataset from 3 separate files. tf.reset_default_graph() # The content of TFR...
Lion Lai
1

votes
0

answer
275

Views

cannot build tensorflow in Ubuntu 1604

My Env: Ubuntu 1604 Python 3.5.2 bazel 0.9.0 JDK 1.8.0_152 My problem: I have ran the command ./configure before built the tensorflow source code. But I till get following error: no such target '@local_config_git//:gen/spec.json': target 'gen/spec.json' not declared in package ...... Please speci...
YunFei
1

votes
0

answer
626

Views

how to make tensorflow pb file of the modified model by using pb file of pre-trained graph

I try to make image retrieval application by using tensorflow. I want to use a pre-trained Inception v3 model for feature extraction. I got the pb file of Incetion v3 from tensorflow mobile demo. BUT this model is for classification. so I have to use the model without a few layers at the end of the...
주은혜
1

votes
1

answer
662

Views

keras resume training with different learning rate

I built a simple LSTM model using keras and trained as follows: model = Sequential() model.add(LSTM(activation='tanh',input_dim=6,output_dim=50,return_sequences=False)) model.add(Dense(output_dim=1,activation = 'sigmoid')) model.compile(loss='binary_crossentropy', optimizer =optimizers.Adam(lr = 0.0...
MTANG
1

votes
0

answer
40

Views

Tensorflow CIFAR10 slows down every 100th step

System information OS: Linux Ubuntu 16.04 TensorFlow installed from: Have tried both binary and source TensorFlow version: 1.4.0-19-ga52c8d9, 1.4.1 Python version: 2.7.12 CUDA/cuDNN version: 8.0.61 Hardware: GPU: NVIDIA GeForce GTX 1080 Ti (11GB), RAM: 64GB, CPU: Intel i7-6850K Exact command to repr...
Mark Sonn
1

votes
2

answer
71

Views

Tensorflow multiplication of constants performance slower than tf.random

I'm using Tensorflow for some non-DL computation, and I'm running into a behaviour I don't understand. I am testing the multiplication of a square matrix by itself: tf.matmul(a,a): when the matrix is created with tf.constant when the matrix is randomly initialized at each run My expectation is that...
Anna-Chiara Bellini
1

votes
1

answer
378

Views

Neural Network High Confidence Inaccurate Predictions

I have a trained a neural network on a classification task, and it is learning, although it's accuracy is not high. I am trying to figure out which test examples it is not confident about, so that I can gain some more insight into what is happening. In order to do this, I decided to use the standard...
hockeybro
1

votes
0

answer
118

Views

How to load tensorflow metagraph via C++

I want to load a metagraph via C++ code, and later the checkpoint weights. To load the metagraph, I first generate a pb file from it with tf.Session() as sess: new_saver = tf.train.import_meta_graph(root_dir + meta_graph) tf.train.write_graph(sess.graph_def, root_dir, export_pb, as_text=False) Then...
PKUEcho
1

votes
0

answer
287

Views

Rendering OpenAI environment in Tensorforce

I am training an agent to play the HalfCheetah-v1 environment in OpenAI using Tensorforce. I was able to train the agent and get the rewards, but I was not able to actually render the environment after the model finished running. I have saved the model using the following code: modelDir=os.path.join...
jhacks
1

votes
0

answer
42

Views

What is the meaning of multiple occurrences of the same network/object in tensorboard?

I am wondering how multiple occurrences of the same network/object in tensorboard must be interpreted. If I look at this example of a graph with two networks the generator and the discriminator. I see both of the networks multiple times with suffices '_1' '_2' and so on. The intention of this is to...
Sören
1

votes
0

answer
172

Views

Google TensorFlow Object Detection API on Windows - Labelling Images

I have been using Labellmg to create the xml files in PASCAL VOC format. There is a prebuilt binary version which makes it really easy to start drawing bounding boxes around objects in the images. https://github.com/tzutalin/labelImg At times, the bounding boxes end up covering unwanted pixels. I...
kannan k
1

votes
1

answer
549

Views

Python|Keras: how to define a callback to interrupt/exit training per user's request

Currently, I can 'safely' interrupt Keras neural net training via: early stopping callback (once accuracy improvements are small) stopping the execution and restarting from the last saved model However, I'm looking for a way to have a more robust way to interrupt the training. Is there a way to cr...
Oleg Melnikov
1

votes
0

answer
242

Views

How can I get the global_step in a MonitoredTrainingSession?

I am running distributed an mnist model in distributed TensorFlow. I would like to monitor 'manually' the evolution of the global_step for debugging purposes. What is the best and clean way to get the global step in a distributed TensorFlow setting? My code below ... with tf.device(device): images =...
Malo Marrec
1

votes
0

answer
55

Views

Tensorboard exception with summary.image of shape [-1, 125, 128, 1] of MFCCs

Following this guide, I'm converting a tensor [batch_size, 16000, 1] to an MFCC using the method described in the link: def gen_spectrogram(wav, sr=16000): # A 1024-point STFT with frames of 64 ms and 75% overlap. stfts = tf.contrib.signal.stft(wav, frame_length=1024, frame_step=256, fft_length=1024...
rodrigo-silveira
1

votes
0

answer
77

Views

Equivalent of numpy 'ufunc.at' method in Tensorflow

Note that this is essentially the same question as here but unfortunately the solution does not work in general even though it was accepted as the answer. Even more importantly, one of the main use cases for the ufunc.at methods, when there are multiple identical indices, is where it fails. For now...
rwolst
1

votes
0

answer
182

Views

Seq2Seq prediction speed is slow

i'm trying to implement a Seq2Seq model using LSTM in tensorflow (from scratch, without rnn cell), the model works fine but the predict time for one sentence is slow for me. about 2 -> 6 sec a sentence. Is that normal? My model: 2 LSTM for encode 2 LSTM for decode Attention mechanism Vocabulary: 400...
Khoa Ngo
1

votes
1

answer
204

Views

Tensorflow multi-label classification with partial unlabel

I wonder whether tensorflow could distinguish between negative label and unknown label. For example, in a news classification scenario, I am sure the instance belongs to 'sports' and 'entertainment', and also sure it doesn't belong to 'politics', but not sure it belongs or not to 'game'. If I treat...
linpingta
1

votes
1

answer
170

Views

Where do I put a TensorFlow model in a web application and how do I access it?

I have a trained TensorFlow DNN model that I trained in Python but I saved it so I am able to access it through a Java program. I have no issues using the model with a regular Java application. I loaded the model using the following code: SavedModelBundle bundle = SavedModelBundle.load('/scitweetsIn...
mdmarshmallow
1

votes
0

answer
37

Views

TensorFlow checkpoints and models vis-a-vis multi-gpu settings

Let us take a practical situation a researcher often finds him/herself into when using TensorFlow : Multiple GPUs are available for training and I'd like to use them for speedup. Subsequently I'd like to give the trained model to a colleague or collaborator with a different (maybe 1 !!) number of GP...
Ujjwal
1

votes
0

answer
662

Views

Tensorflow to UFF conversion fails for a simple network

The conversion of the following tensorflow model to UFF fails at tf.matmul operation: x = tf.placeholder(tf.float32, shape=[None, 1, 1, 100], name='input_x') y = tf.placeholder(tf.float32, shape=[None, 1, 200, 3], name='input_y') net = layers.conv2d(x, 100, [1,1], data_format='NHWC') net = layers.co...
user2890755
1

votes
1

answer
415

Views

Tensorflow Object detection development in IOS app - nonmaxsuppressionV2

I am trying to detect object using ssd_mobilenet_v1_coco model. My own trained model file .pb file is used for detection. After successful build , click run button and I got the below error. 'Not found: Op type not registered 'NonMaxSuppressionV2' in binary running on IPhone. Make sure the Op and Ke...
Balaganesh R
1

votes
0

answer
976

Views

Tensorflow retrained graph in C# (Tensorflowsharp)

I'am just trying to use a retrained inception model in Tensorflow sharp in Unity. The retrained model was prepared with optimize_for_inference and is working like a charm in python. But it is pretty inaccurate in c#. the code works like this: First i get the Picture //webcamtexture transformed to pi...
Robert Kaa Frank
1

votes
0

answer
485

Views

Reading HDF5 inputs in TensorFlow

I'm training a neural network in TensorFlow that currently takes in PNGs as inputs. While this works fine, I'd like to move to using HDF5 format inputs for more flexibility, but I'm having issues adapting the code. In both cases, a text file contains a list of the paths to all the PNG/H5 files that...
user2406671
1

votes
0

answer
304

Views

Tensorflow NaN loss during training

I have made a neural network which is basically a copy of a tutorial on the tensorflow website (https://www.tensorflow.org/tutorials/layers). The only difference is that my neural network is a 3D conv net and not a 2D conv net. I had many errors regarding my data and I'm not sure whether this one al...
Simon Zeng
1

votes
0

answer
39

Views

How to find out if Tensorflow is built from binary or source?

Is there a way to find out if the version of Tensorflow installed on a computer is built from binary or source with Ubuntu 16.04?
Mark Sonn
1

votes
0

answer
1.1k

Views

Tensorflow: Attention heatmap visualization

I am trying to create a heat map the same as the image below using attention in TensorFlow r1.4. I am using tf.contrib.seq2seq.BahdanauAttention and tf.contrib.seq2seq.AttentionWrapper for implementation of attention mechanism. I have seen a workaround here (Visualizing attention activation in Tenso...
nix
1

votes
0

answer
22

Views

Why and when does the tensor's shape information unspecific?

I found piece of code like this: y = tf.strided_slice(data, [0, i * num_steps + 1], [batch_size, (i + 1) * num_steps + 1]) y.set_shape([batch_size, num_steps]) as Clarification on tf.Tensor.set_shape() said, set_shape can make the shape information more specific. But why data's shape information her...
setail
1

votes
0

answer
32

Views

No GPU memory when inferencing with Tensorflow

I'm inferencing one image on a just-started EC2 instance (G2) with Tensorflow. But saw the following error: I'm not sure if it's a GPU or Tensorflow setup issue because the instance has been stopped for a while and I just started it. The memory shouldn't be a problem. Please help me diagnose it. Tha...
Yuli
1

votes
0

answer
205

Views

TensorFlow conv2d slow compared to others

I'm trying to use TF to do some filtering. I have 60 images of size 1740 x 2340 and a guassian filter of size 16 x 16. I ran a conv2d as strides = [1,1,1,1] data_ph = tf.constant(data,tf.float32) filt_ph = tf.constant(filt,tf.float32) data_format = 'NCHW' conv = tf.nn.conv2d(data_ph,filt_ph,strides,...
user3347617
1

votes
1

answer
693

Views

Time series classification using LSTM - How to approach?

I am working on an experiment with LSTM for time series classification and I have been going through several HOWTOs, but still, I am struggling with some very basic questions: Is the main idea for learning the LSTM to take a same sample from every time series? E.g. if I have time series A (with sam...
Andre444
1

votes
0

answer
40

Views

Tensorflow - running python files in Spyder

to give a bit of background I'm trying to use TensorFlow object detection api. I have been following this tutorial https://www.youtube.com/watch?v=MoMjIwGSFVQ 15 minutes into it he uses Spyder, and runs the python files on it. I've never used Spyder before, and for some reason it's not running my f...
BBKING
1

votes
0

answer
103

Views

Why match_filenames_once function returns a local variable

I was trying to understand the mechanism of tensorflow for reading images using queues. I was using the code found here, whom basic parts are: filename_queue = tf.train.string_input_producer(tf.train.match_filenames_once('D:/Dataset/*.jpg')) image_reader = tf.WholeFileReader() image_name, image_file...
Eypros
1

votes
0

answer
569

Views

Tensorflow Object Detection using Tensorflow Mobile

I am trying to use a custom model in the TF-Detect Android Demo. model: ssd_mobilenet_v1_coco The model is trained on 8 classes. After exporting the model I've optimised it using Tensorflow-Mobile bazel-bin/tensorflow/tools/graph_transforms/transform_graph \ --in_graph=frozen_inference_graph.pb \ --...
Krishnendu S. Kar
1

votes
2

answer
3.5k

Views

ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory

I have installed cuda-8.0 and cudnn5.1 on CentOS. Then, when importing tensorflow (python 3.6), it gives the error as above. I have already set symbol link as below in /etc/profile. Are there any guys who occurred this kind of problem? export PATH=/usr/local/cuda-8.0/bin:$PATH export LD_LIBRARY_PAT...
Yang Feng
1

votes
0

answer
101

Views

How to restore a model in distributed tensorflow?

I have trained the model using 4 CPU machines.For restoring it do I need to save the model on every machine? And how do I get the saved state from each CPU on the chief node so that it can be restored? Currently, if I try to restore the model error I am facing is tensorflow.python.framework.errors_i...
Rajendra
1

votes
1

answer
1.1k

Views

tensorflow object detection API Error at windows

I changed some sources to be real time object detection in the object_detection_tutorial provided by the tensorflow object detection API. However, the following error occurred. What is the solution? The code that caused the problem is shown below. import numpy as np import os import six.moves.urllib...
MrSong
1

votes
0

answer
18

Views

'LookupAlignConvolution2d' no object '_convolution_op' attribute error

I have been working with the project tf-lcnn (https://github.com/ildoonet/tf-lcnn). I have built tensorflow from sources (1.4.1) and I am using python3 to run the command python3 train.py. This issue is that when I run said command I get: AttributeError: 'LookupAlignConvolution2d' object has no attr...
A.McIntosh
1

votes
0

answer
218

Views

Load-balancing for real-time production environments in TensorFlow

Let's say that you want to have a machine that serves up inferences to input data that and has multiple GPU cards. The inferences are made by a model with high GPU RAM requirements. These inferences are consumed by multiple machines on the same LAN. The input data is high volume and needs to be pro...
Kevin Johnsrude
1

votes
0

answer
324

Views

Getting very low categorical_accuracy while refitting loaded Keras model

I'm getting a very low val_categorical_accuracy on previously trained model. Steps I followed: The model was trained for 30 epochs. It achieved ~0.60 val_categorical_accuracy and categorical_accuracy. It was saved using Kerases model.save() method. On loading with Keras.models.load_model() and evalu...
Marcel
1

votes
1

answer
48

Views

Is there a way to only detect objects with width > 200px in tensorflow?

Is there a way filter object detection with width? Assuming that I have to detect apples with WIDTH > 100 Pixels. Is there a build-in tensorflow function to do that? or do I have to condition the code myself before drawing the bounding box?
Muhammad Hamza Javed

View additional questions