# Questions tagged [tensorflow]

**IMPORTANT**: PLEASE ADD THE LANGUAGE TAG YOU ARE DEVELOPING IN. TENSORFLOW SUPPORTS MORE THAN ONE LANGUAGE. TensorFlow is an open source library for machine learning and machine intelligence. It is developed by Google and became open source in November 2015.

43,978 questions

**0**

votes

**0**answers

3 views

### When using tf.saved_model and pass string as input , get Unable to get element as bytes

When loading saved model, I try:
note that example_proto is a tf.example object
predict_fn = tf.contrib.predictor.from_saved_model(saved_model_dir)
a = {'inputs': [{'examples': str(example_proto....

**0**

votes

**0**answers

7 views

### LSTM produces repetitive output

I'm using tensorflow-keras to generate text and this code is similar to https://machinelearningmastery.com/text-generation-lstm-recurrent-neural-networks-python-keras/. The problem I'm getting is the ...

**0**

votes

**0**answers

5 views

### Tensorflow model optimization diverges after restoring

I run an optimization for a tensorflow model over many epochs (3000-5000), and it works as it is supposed to. I save my model afterwards. Sometimes I need to continue the learning of this model, so I ...

**0**

votes

**0**answers

12 views

### How to print the values of a Sigmoid layered tensor?

I was creating an RNN network and thus trying to view the values obtained from a fully connected Sigmoid layer. But I cannot print the values by directly printing the tensor. Is there a way to do it?
...

**0**

votes

**0**answers

2 views

### how to use other tokenlizer(NLTK,Jiebe etc.) in tensorflow serving

Recently,i am using estimator to trian and deploy a tensorflow model, but when i deploy the model(was exported using estimator serving_fn including tf.py_func) using tensorflow seving, there is a ...

**0**

votes

**0**answers

9 views

### Difficulties with eval_input_receiver_fn() for keras ResNet50 model

I am trying to make custom eval_input_receiver_fn() to pass to tfma.export.export_eval_savedmodel() in the following way:
model = tf.keras.models.load_model('/Users/user/Documents/../model_name.h5')
...

**-1**

votes

**0**answers

17 views

### Unable to Proceed With the Tensorflow Object Detection Training

I've followed the guidelines from here
I am unable to proceed with the training process
The following are the 2 commands tried:-
python legacy/train.py --logtostderr --train_dir=training/ --...

**0**

votes

**0**answers

4 views

### Tensorflow : next_batch use without for loops

In the attached code snippet, mnist.train.next_batch(batch_size) is used without any for loop. I have two doubts.
1 - How does the code remember the last updated values
2 - How does it loop over ...

**-1**

votes

**0**answers

15 views

### Advanced broadcasting in TensorFlow (or Numpy)

In TensorFlow I have a rank-2 tensor M (a matrix) of shape [D, D] and a rank-3 tensor T of shape [D, D, D].
I need to combine them to form a new matrix R as follows: the element R[a, b+c-a] is given ...

**1**

vote

**0**answers

9 views

### tensorflow.contrib.graph_editor in TF 2 API?

To my understanding tensorflow.contrib is removed in TF 2.0 API. What's the new 2.0 alternative for tensorflow.contrib.graph_editor in TF 1.0 API? https://www.tensorflow.org/api_docs/python/tf/...

**0**

votes

**0**answers

33 views

### How to start a new console and run a command in it programmatically?

I'm running tons of experiments and I'm tired of manually openning a terminal and typing:
!tensorboard --logdir="C:\Users\OneDrive \Pycharm\DANN MNISTM SVHN\tmp\1561358957553" --host localhost --port ...

**1**

vote

**0**answers

32 views

### Best way to represent input data in an tensor for neural network

I have a two parts question:
Part 1:
Im developing a neural network model for classification. Let's say I have an image with 224*224*3 as dimensions and I'm applying 2D convolution, what is the best ...

**0**

votes

**1**answer

6 views

### How to fix “Django celery is getting task and start processing but not completing the full job”

I am working with MaskRCNN popular instance segementation problem using tensorflow and keras. I am also using django restframework to process. While celery recieve the task it starts processing and ...

**0**

votes

**0**answers

14 views

### classifying all images in a directory

I have created a classifier using Tensorflow for poets cloned from this link: https://github.com/googlecodelabs/tensorflow-for-poets-2
I trained my own data with self-created labels.
python scripts/...

**-1**

votes

**0**answers

25 views

### keras training acc is 0.0000e+00 or negative numbers like 1.2416e-05

I'm doing some research about using keras to predict soundwave speed from rocks images. But my model loss is huge like 5000 or more, acc is 0, some times a negative number. I doubt something wrong ...

**-4**

votes

**0**answers

27 views

### Predict next element in array using smart AI [on hold]

Just Simple AI needed to predict next element in array.
Can use tensorflow, the AI must calculate the difference between numbers and then have possible next output, keep in mind that i will be ...

**-2**

votes

**0**answers

9 views

### Load Keras model in tensorflowjs for fast predictions

I recently wrote a code for text classification with keras, but when I tried to deploy it, it's very slow. So I wanted to convert the model to Tensorflowjs code for predicting faster.
The bottleneck ...

**-1**

votes

**0**answers

9 views

### How to solve this tensorflow error about shapes of data and flattened input? [on hold]

I want to solve shape_not_fitted problem of tensorflow using densenet. The Data shape is two dimensional and expected flatten_input is three dimensional. What should I do to fit these shapes? Thanks ...

**0**

votes

**0**answers

14 views

### Is Tensorflow Object Detection API a good solution to find defects for printing press?

I want to find defect for printed object, where I am using a good quality of camera to capture printed object.
Scenario :
=> There will be a master copy.
=> This master copy need to be checked ...

**-1**

votes

**0**answers

13 views

### What that mean this message when I update tensorflow and keras in Anaconda Prompt ? Is wrong or Okay?

(tensorflow) C:\Users\Ruben>conda update tensorflow
Collecting package metadata: done
Solving environment: done
All requested packages already installed.
C:\Users\Ruben>SET DISTUTILS_USE_SDK=1
C:\...

**0**

votes

**0**answers

17 views

### How to save a tensorflow graph without initialise a variable?

The problem I encountered can be reflected as follow:
tf.reset_default_graph()
x = tf.placeholder(dtype=tf.int32, shape=())
init = tf.zeros(shape=tf.squeeze(x), dtype=tf.float32)
v = tf....

**-3**

votes

**0**answers

11 views

### ImportError: cannot import name 'getConfig' any advice?

Please help. I am trying to get this software to work, but I don't have a clue about this 'getConfig'.
python3 train/index.py -h Traceback (most recent call last): File
"train/index.py", line ...

**0**

votes

**1**answer

24 views

### Can I obtain the expression of derivation by using Pytorch or Tensorflow

My question is whether I could obtain the expression after I compute the derivation by using Pytorch or Tensorflow. For better understanding my question I provide an example below:
I have a function (...

**0**

votes

**0**answers

22 views

### Completely different results from the same initial guess

I am new to Tensorflow. I did a simple multivariate regression with the ordinary GD optimization algorithm. However, I got completely different results when two different variable definitions are ...

**0**

votes

**1**answer

13 views

### Tensorflow Object Detection - mAP steady, but Total Loss is dropping. Keep training?

Training an Object Detection classifier with Tensorflow 1.12.2 and Python 3.6. Using about 20,000 images over 4 classes, and after 160K steps the mAP is pretty steady, but the Total Loss is still ...

**0**

votes

**0**answers

19 views

### Implement Causal CNN in Keras for multivariate time-series prediction

This question is a followup to my previous question here: Multi-feature causal CNN - Keras implementation, however, there are numerous things that are unclear to me that I think it warrants a new ...

**1**

vote

**0**answers

21 views

### Does zip tensorflow.dataset with different tf.type possible?

I want to zip two tensorflow.dataset
dataset1=(images,images)
images has the same size (1000, 640, 640, 3)
dataset2=(nparray)
nparray is derived from scipy.load_mat and it's size is (1000, 640, ...

**0**

votes

**1**answer

14 views

### Passing 1D arrays as elements of a 3D array in Tensorflow

In Tensorflow: I have a set of arrays, x0,x1,x2 and x3 that are generated in my program and each array has N elements. I also have a zeros-initialized 3D tensor of dimensions (N,2,2).
I want to make ...

**-1**

votes

**0**answers

10 views

### How to fix the fetch argument error in implementing Bayesian Neural Network with tenssorflow

placeholder_X = tf.placeholder(tf.float32, shape = [None, 19])
placeholder_y = tf.placeholder(tf.float32, shape = [None,1])
#Build an iterator over training batches
#training_dataset = tf.data.Dataset....

**-1**

votes

**0**answers

11 views

### Convert scikit-learn model to tensorflow (or save as .pb file)

I have created scikit-learn model, and now I need to somehow get it as tensorflow model (to save it later as .pb file). Is there any tool which can convert scikit-learn models to tensorflow?

**0**

votes

**1**answer

17 views

### How do I add a dropout layer before a hidden layer in tensorflow?

I am little bit confused on adding a dropout layer before my second hidden layer in tensorflow?
w_int = tf.initializers.glorot_normal()
w = tf.Variable(w_init(shape=[512, 256]))
b = tf.Variable(tf....

**0**

votes

**0**answers

28 views

### How does the input output tensors work for tensorflowjs layers api

I have a classification problem with 8 inputs and 1 output. I create the below model:
const hidden = tf.layers.dense({
units: 8,
inputShape: [58, 8, 8],
activation: 'sigmoid'
});
const output = ...

**-1**

votes

**1**answer

38 views

### Creating a matrix of arrays

I want to create a matrix with elements that are arrays in tensorflow
Assume that I want to create a matrix of size (2, 2*N) (in tensorflow) where N is the size of some arrays I have, say
a=[1,2,3,...

**0**

votes

**1**answer

22 views

### Issue when trying to read MNIST data set

I am about to learn about Neural Networks and I am about to reproduce a tutorial which trains a Neural Network with the target to identify handwritten letters. The training of the Neural Network ...

**1**

vote

**3**answers

38 views

### Numerical stability of tf.reduce_mean

Numerical stability of tf.reduce_mean is worse than np.mean, on both cpu and gpu.
Does tf.reduce_mean have numerical problem whenever the sum exceeds the limit of the floating point type?
Is there a ...

**0**

votes

**0**answers

9 views

### How to access tflite model from Tensorflow Java API?

I have a tflite model that I am using in Android for Handwriting Recognition. I want to implement the same in my backend using Java.
I tried using the same Android libraries and also used TensorFlow ...

**-2**

votes

**0**answers

7 views

### Can someone help me understand TF lite function ApplyFilter() code?

Can someone Kindly help me understand this code? It is the function from TENSORFLOW LITE DEMO APP for classification purpose.
void applyFilter(){
int num_labels = labelList.size();
// Low pass ...

**-1**

votes

**1**answer

20 views

### How to make sense of dense layer units as dimensionality of predicted data?

I am dealing with a dataset that contains a time series data of 2 features x,y coordinates. I am interesting in predicting the future x,y (as a tuple, if possible ) from previous coordinates. I am ...

**0**

votes

**1**answer

29 views

### Implementing and running a 3D U-net for denoising of synthetic data

I'm building a u-net for denoising some synthetic images over time. My data is (256,256,128,1) which is 256*256 grayscale images over 128 time-steps(trajectory is random cosin). I have 120 images, so ...

**1**

vote

**1**answer

32 views

### How to fix ValueError (x and y should have the same length) while having multiple outputs?

I'm setting up a model which has an image input (130,130,1) and 3 outputs each containing a (10,1) vector where softmax is applied individually.
(Inspired by J. Goodfellow, Yaroslav Bulatov, ...

**0**

votes

**0**answers

11 views

### The yolov3 (build by myself) can not detect the correct object

I build the yolov3 by the tensorflow low level api (tf.nn, tf.get_variable...). But the detection of model I train unable to detect any correct object in image.
I have used the high level api (tf....

**-1**

votes

**0**answers

11 views

### How to share my local embedding projector of tensorboard choosing publish

In the Embedding projector of the tensorboard when I want to share my embedding's link, after clicking on publish in step 2 (projector config) I do not know what I should put in the tensorpath and ...

**0**

votes

**0**answers

22 views

### ValueError: No variables to save in tensorflow

I am trying to replicate this github repo. But while running the dense_cap_train.sh script(In the directory ./scripts) I am getting some value error which has already been asked on stackoverflow. I ...

**-2**

votes

**0**answers

45 views

### tensorflow-gpu won't use GPU

I'm trying to get a Keras CNN to run on GPU but it won't, and I can't find out how.
Output from nvidia-smi:
Sat Jun 22 22:28:01 2019
+----------------------------------------------------------...

**1**

vote

**0**answers

28 views

### Bias reduces Accuracy

I am programming an application to recognise handwritten digits with the MNIST dataset for school, I added a bias and wanted to write that it improves accuracy but it actually didn't help. After one ...

**0**

votes

**1**answer

28 views

### CIFAR-10 TensorFlow: InvalidArgumentError (see above for traceback): logits and labels must be broadcastable

I am implementing the CNN as below, but I got this error:
InvalidArgumentError (see above for traceback): logits and labels must
be broadcastable
I have attached my partial code below. I suspect ...

**0**

votes

**0**answers

13 views

### Neural evolution combined to gradient descent

To optimize a model we can either use gradient descent to train a model with a dataset, or we can use neural evolution and generate only the first initialized weights without training them and use ...

**0**

votes

**0**answers

11 views

### Always says “No dashboards are active for the current data set” when activating Tensorboard

I am using Python 3.7.3 in macOS system in Anaconda environment. Tensorflow (1.14.0), Matplotlib (3.1.0) and other modules were installed there and everything worked fine. I wrote the following codes ...

**1**

vote

**0**answers

24 views

### Creating new Tensorflow Devices multiple times

I'm trying to run tensorflow-deeplab-v3 model on a server to segmentate images that I send. Everything works fine but the problem is every time I send an image the model looks for GPU and creates a ...

**0**

votes

**0**answers

18 views

### Tensorflow hub: Extracting features from the topmost convolutional layer of a Resnet50

I am using Tensorflow Hub to extract features from an image. Namely, I am using the module hub.Module("https://tfhub.dev/google/imagenet/resnet_v2_50/feature_vector/3").
Because I want to extract ...