Tensorflow dataset produced in Python has different readings in Tensorflow Java API (Label Image)

2018-11-06T00:25:13

Background: I am new to Tensorflow and AI and wish to try out Tensorflow in a Java based environment. Found Tensorflow has a Java API and tried it out but results don't seem to be similar to my Python implementations. I used Maven for my Java implementation.

I had retrained a dataset using Tensorflow in Python by following the Tensorflow for Poets tutorial.

In a Python based Tensorflow environment the dataset outputs values which are more or less correct. For example, if I have an image of a car and my classification options are car, bug,or building; it would output car.

But in my Java equivalent which I tried using the Tensorflow Java API and Image label demo; the datasets I produced earlier are readable but the outputs are completely different from the Python implementation. Unlike the Python example, if I throw a car it would output it as a bug or building.

I had tried the output data on several different machines with processors and gpus from different generations to see if it would affect the output; but it appears to be exclusive with the language/API.

  1. Any ideas as to why the two implementations using the same dataset produce completely different outputs?

  2. And is there any way I could get my Java version to output similar results to my Python example?

Copyright License:
Author:「nickzor」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/53158340/tensorflow-dataset-produced-in-python-has-different-readings-in-tensorflow-java

About “Tensorflow dataset produced in Python has different readings in Tensorflow Java API (Label Image)” questions

Background: I am new to Tensorflow and AI and wish to try out Tensorflow in a Java based environment. Found Tensorflow has a Java API and tried it out but results don't seem to be similar to my Pyt...
I'm currently using Tensorflow's Dataset API to load and preprocess images for training and testing. Here's a snipped of the code I'm using to do so: image_string = tf.read_file(self._data_conf.
I am using TensorFlow's Dataset API to load and preprocess images. I would like to add summaries of my preprocessed images to Tensorboard. What is the recommended way to do this? So far, my code ...
I'm trying to figure out how can I use the Dataset module of Tensorflow by studying an official example about cifar10 on https://github.com/tensorflow/models/blob/master/official/resnet/cifar10_mai...
I am trying to develop an image classification model using CNN on my own image dataset I am aware of developing such models with existing datasets in tensorflow But I am struggling to add my datase...
I use convolutional network for clasifying images with different shapes. I can not find a way to load images in Tensorflow. Based on this issue it should work with tf.data.Dataset(). I create Datas...
I am trying to load in the cifar100 dataset with the tesorflow_dataset library in Python. Once the data is loaded in with .load(), I am trying to transform the images to a set size with .map() the ...
I'm trying to read cifar-10 dataset from tensorflow_datasets into 4 parts: train_data: The tensors contain training data image train_label: A tensor contains training data label test_data , test_la...
Currently, I want to improve reading data performance. i'm use TensorFlow's DataSet api read data from disk. I want to know whether have method that read image data from memory and how to load imag...
How can I create an image summary in tensorboard using tensorflow >2? It is clear to me how I should do with tensorflow 1 (e.g. using placeholder), but I'm not sure about the new tensorflow. This ...

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.