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.

0
votes
0answers
3 views

Dataset creation for RNN?

I want to create a sequence of lenght L such that the training sample is a 2-tuple of input x and output u where inputis a tensor of size Lx10:second dimension is 10 since each integer is represented ...
0
votes
0answers
9 views

Tensorflow Keras Model working on CPU but doesn't work with GPU

I am beginner in Tensorflow and Keras. I ran the code on my CPU with the following configuration and it works completely fine: Tensorflow version: 1.10.0 tf.keras version 2.1.6 But when I try to ...
-1
votes
0answers
9 views

Can Tensorflow now read only from TFRecords ?

Can I read my own custom dataset format with tensorflow or it requires everything to be in TFRecords format ?
0
votes
0answers
5 views

Error when using CrossShardOptimizer when using TPU

I am trying to use the CrossShardOptimizer when running my code on TPU. I define my optimizer here optimizer = tf.contrib.tpu.CrossShardOptimizer(tf.train.AdamOptimizer(1.0)).minimize(loss) And ...
0
votes
0answers
2 views

how to debug the custom gym environment with DQN

everyone. I create a simple gym environment named "grid_world". It is a 4X4 grid world, and locals an agent and a target. the goal is the move the agent to the target. I used DQN to train my agent, ...
0
votes
0answers
6 views

what is XLA_GPU and XLA_CPU for tensorflow

I can list gpu devices sing the following tensorflow code: import tensorflow as tf from tensorflow.python.client import device_lib print device_lib.list_local_devices() The result is: [name: "/...
0
votes
0answers
11 views

Is Tensorflow portable/deployable?

Say I want to use Tensorflow in my game (and have the full GPU utilization). Can I then package that and put that game on Steam? (Assuming I'll have some way to make the Python frontend portable.) I ...
0
votes
0answers
8 views

Tensorflow - mix different graph for multiclass detection

I have the needs to use 2 graph on tensorflow as same time, to detect different classes of object. So basically first I load the first model and perform detection: # Name of the directory containing ...
-1
votes
1answer
22 views

Tensorflow read from csv and print

import tensorflow as tf params ='params.txt' with tf.Session() as sess: paths_queue = tf.train.string_input_producer([params], shuffle=False) reader = tf.TextLineReader() _, ...
0
votes
0answers
5 views

Loss does not decrease when I train Pose network

I've train Pose Detection Network. 2 Weeks ago, I finally trained Pose network and it works well. So, I add 3d_conv and rnn to Pose network and it's loss doesn't decrease. well.. there are two loss ...
0
votes
0answers
13 views

Is installing conda packages on other python distributions supported?

I want to install conda packages on an existing python distribution I managed to make it 'sort of' work by installing the conda package pip install conda and then execute a python script: import ...
1
vote
0answers
14 views

I am getting an error while converting JSON file to TFRecord

I am using LabelBox for my upcoming project for image annotation and labeling. I am following LabelBox tutorial for converting export.json to TFRecord. My code snippet: import json tfrecord_paths =...
0
votes
0answers
13 views

with model_dict['graph'].as_default(), tf.Session() as sess: ^ SyntaxError: invalid syntax

I am not sure why I get this syntax error, because I use the same train method for another thing and I get no error. How can I fix it? import copy import os import math import numpy as np import ...
0
votes
1answer
15 views

Multiply multiple tensors pairwise keras

I want to ask if it is possible to multiply two tensors pairwise. So for example, I have tensor output from LSTM layer, lstm=LSTM(128,return_sequences=True)(input) output=some_function()(lstm) ...
0
votes
0answers
4 views

Tensorflow: Create input_fn for text preprocessing using tf.data.Dataset API

I'm working through training a Tensorflow model and am using the tf.data.Dataset API. I'm working through this tutorial: https://nbviewer.jupyter.org/github/amygdala/code-snippets/blob/master/ml/...
0
votes
0answers
10 views

Is Tensor Flow compatible with Julia 0.6.4?

So I have a project in my machine learning class and we are using Julia as our programming language. We can use any packages we want to build neural networks but I can't seem to get Tensor Flow to ...
0
votes
1answer
9 views

AWS Sagemaker: AttributeError: module 'pandas' has no attribute 'core'

Let me prefix this by saying I'm very new to tensorflow and even newer to AWS Sagemaker. I have some tensorflow/keras code that I wrote and tested on a local dockerized Jupyter notebook and it runs ...
0
votes
0answers
11 views

tensorflow how can I solve dtype conflict between one_hot and sign

My neural network has the following output: logits are outputs from tanh nodes, so the value is a float within (-1,1) action are the sign of logits one_hot are the one_hot version of action, with ...
0
votes
0answers
4 views

Is it possible to install tensorflow-model-server on Windows 7 x64?

I have a computer configured with Windows 7 64 bits and I need to install the tensorflow-serving-api and tensorflow-model-server libraries. I found the first of these on the pip repo, but the second ...
0
votes
0answers
12 views

ValueError: Operation u'tpu_140462710602256/VarIsInitializedOp' has been marked as not fetchable

The code works fine on GPU and CPU.But when I use keras_to_tpu_model function to make the model able to run on TPU, the error occurred. This the full output on colab:https://colab.research....
0
votes
1answer
6 views

Tensorflow Hub : Stuck while importing a model

Trying to import some models with Tensorflow Hub with this code : import tensorflow as tf import tensorflow_hub as hub elmo_model = hub.Module('https://tfhub.dev/google/elmo/2', trainable=True) ...
0
votes
2answers
21 views

Tensorflow, check which values in tensor are whole numbers

I have a tensor: numbers = tf.constant([[4.00, 3.33], [2.34, 7.00]]) What I want to do is get a tensor that has the same dimensions as 'numbers', but has 1's at the indices where numbers is a whole ...
0
votes
0answers
9 views

Google Cloud ML Engine: Trouble With Local Prediction Given saved_model.pb

I've trained a Keras model using the tf.data.Dataset API and am trying to see if I've saved it (as saved_model.pb) correctly, so I can use it on ML Engine. Here's what I've done: estimator = tf....
0
votes
0answers
5 views

Tensorflowsharp and Retinanet — How to determine what to Fetch when graph is run?

I've been using TensorflowSharp with Faster RCNN successfully for a while now; however, I recently trained a Retinanet model, verified it works in python, and have created a frozen pb file for use ...
0
votes
1answer
16 views

Shearing image in tensorflow

I am using tf.keras to build my network. And I am doing all the augmentation in tensor_wise level since my data in tfrecords file. Then I needed to do shearing and zca for augmentation but couldn't ...
0
votes
0answers
16 views

tensorflow feed list feature (multi-hot) to tf.estimator

Some of the feature columns' data type is list. And their length can be different. I want to encode this column as a multi-hot categorical feature and feed it to tf.estimator. I tried the following ...
0
votes
1answer
17 views

Tensorflow debugging

y1 = tf.stack([55, 0, 55]) y2 = tf.stack([11 22 44]) y3 = tf.constant([0., 0., 1.]) x = tf.stack([y1, y2, y3]) x1 = tf.reshape(x, [3, 3]) Is there a way to print or ...
0
votes
0answers
14 views

google colab setting a '^C' in the proccess

I'm running this code that i got from this tutorial I'm trying running the tensorflow object detection api, all code work well, if you run all calls, all cell will works well, and in the end, my ...
0
votes
1answer
12 views

Why `tf.train.Optimizer().compute_gradients(loss)` also returns variables not in the subgraph of `loss`?

I'm manually collecting the gradients statistics of the Multi-Tasking model, the graph of which looks schematically like this: input -> [body_var1 ... body_varN] --> [task1_var1 ... task1_varM] ...
0
votes
0answers
6 views

tensorflow tweak with IndexedSlices

I'm using tensorflow to perform lambdaRank for IR tasks. I used embeddings (tf.gather) so they would return IndexedSlices as grads (Let's call them grad_emb). I have to tweak these IndexedSlices, ...
0
votes
1answer
24 views

Loading images and eval() in tensorflow are super slow

X = [] filelist = gfile.ListDirectory(path_imgs) for filename in filelist: path_filename = path_imgs + filename image_file = file_io.FileIO(path_filename,'rb') image_raw = ...
0
votes
0answers
12 views

Object detection training error :“TypeError: merge_external_params_with_configs() got an unexpected keyword argument 'train_steps'”

System information Have I written custom code (as opposed to using a stock example script provided in TensorFlow):no OS Platform and Distribution (e.g., Linux Ubuntu 16.04):Ubuntu 16.04 TensorFlow ...
0
votes
1answer
26 views

4D input in LSTM layer in Keras

I have data with a shape of (10000, 20, 15, 4) where num samples = 10000, num series in time = 20, height = 15, weight = 4. So I have table 15x4 which is distributed over time. Here is the model I ...
0
votes
0answers
5 views

Tensorflow evaluation render freezing

I hate to ask a question like this as I have very little idea of the root of the problem, but I have been attempting to resolve it for 2 weeks and neither me nor my tech teacher could resolve it. I ...
1
vote
1answer
21 views

What is difference frozen_inference_graph.pb and saved_model.pb?

I have a trained model (Faster R-CNN) which I exported using export_inference_graph.py to use for inference. I'm trying to understand the difference between the created frozen_inference_graph.pb and ...
0
votes
0answers
13 views

What do Faster-RCNN region proposal parameters control?

I am trying to use Tensorflow Object Detection API to detect panels in images like this: The panels are typically small about 26x13 pixels. The green boxes around them are my training labels. My ...
0
votes
0answers
17 views

Google Colab not making use of its GPU

I'm using keras with tensorflow on google colab with hardware accelerator set to 'GPU'. I checked and GPU is configured. Found GPU at: /device:GPU:0 But still, when I run the code, it's taking a lot ...
0
votes
0answers
16 views

Proper Input Function Iterator for MirroredStrategy distributed training

I am trying to use Mirrored Strategy within a GCMLE experiment to distribute training across multiple GPUs. The current error I am getting is: in _call_dataset_fn "dataset_fn() must return a tf.data....
-1
votes
2answers
29 views

keras not using gpu but tensorflow is

Keras is not using the my GPU, even though tensorflow seems to run fine with it. I followed other folks suggestion to check tensorflow with: import tensorflow from tensorflow.python.client import ...
1
vote
0answers
12 views

Pre-trained “CNN” model for “Head Pose” detection

Dears, If you please, I am trying to implement a "Head Pose" (Front, Up, Down, Left, Right) detection project using "CNN" and I need to use a pre-trained network as I have small amount of training ...
0
votes
0answers
14 views

TensorFlow Output: One-Hot Encoding vs. Index

I want to ask a conceptual question about when to use one-hot encoding and when to use index to represent the labels in multi-class classification problems in tensorflow. I encountered the dimension ...
-1
votes
0answers
14 views

How to train tesseract 4 for a new font

I'm trying to train tesseract 4 based on the Tutorial on GitHub. By using tesstrain.sh I get an error. Does anyone know what I'm doing wrong? The target is to train the eng-model for the font "Comic ...
0
votes
0answers
3 views

How to use Sugartensor to add a validation method during the training and write a new summary?

I successfully build, train and test the CNN network using Sugartensor. I can verify model performance by using tensorboard. I want to add a validation method during the training so that I can verify ...
0
votes
1answer
9 views

Inference on served tensorflow model fails with float input

I'm trying to run inference on a served tensorflow model. More specifically, sending a JSON request through REST to get a prediction. I'm actually just doing the basic example outlined here: https://...
0
votes
0answers
15 views

How to run tf.nn.dynamic_rnn() in tensorflow

I have shape of input_data is `Tensor("Placeholder_1:0", shape=(24, 30), dtype=int32) and when i am running the tf.nn.embedding_lookup(wordVectors,input_data) then shape of my data is Tensor("...
0
votes
0answers
21 views

Tensorflow CNN custom image preprocessing, splitting for train and test

A follow up problem with the bulk of the previous one solved with the great, streamlined help from T. Kehler I have the code good and running but I need help with preparing the data. I'm not up to ...
0
votes
0answers
26 views

Tensorflow GPU Backend: Model train Python.exe stopped working - keras

I have installed CUDA and cuDNN on my laptop. My GPU is GeForce MX150. I run this code: In [1]: from tensorflow.python.client import device_lib print(device_lib.list_local_devices()) [name: "...
1
vote
0answers
23 views

Is the class generator (inheriting Sequence) thread safe in Keras/Tensorflow?

For making the training of a model faster, it seems to be a good practice to populate/generate batches on CPU and run the training of the model on GPU in parallel. For this purpose, a generator class ...
0
votes
0answers
14 views

Estimator API: How to use stateful RNNs?

I am trying to the tensorflow Estimator-API (https://www.tensorflow.org/guide/estimators) for RNN based neural networks. A simple RNN would look something like this: lstm_cell = tf.nn.rnn_cell....
0
votes
0answers
10 views

Train multiple subgraphs sequentually using Tensorflow Estimators

I would like to train GoogleNet, preferably using tensorflow estimators as my existing code is written around estimators. The difficulty is that Googlenet has multiple auxiliary classifiers, that use ...