Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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.

2
votes
0answers
8 views

Fully connected layer output explodes, but weights, gradients, and inputs all have sane values

I'm trying to train a GAN, and the architecture includes a fully connected layer before the output activation function. In my case, by the second training iteration this layer's output always explodes....
0
votes
1answer
7 views

Can I use fit() function with images in Keras?

I want to use vgg16 to train a dataset that contains images. Can I use fit() function instead of fit_generator() in Keras? How?...
0
votes
1answer
15 views

how to visualize InceptionV3 hidden layers

I am following google codelab: Tensorflow for poet to train my custom model. This google codelab use the Inception-V3 model for training. The inception-V3 model have 48 layer. My question is that ...
0
votes
2answers
20 views

Custom conditional Keras metric

I am trying to create the following metric for my neural network using keras $$ s = \left\{ \begin{array}{ll} \sum_{i=1}^{n} e^{\frac{-d_i}{10}}-1 & \quad d < 0 \\ ...
0
votes
1answer
12 views

Should the cost function be zero using TensorFlow's sigmoid_cross_entropy_with_logits?

I'm building a CNN to make a binary classification (1 or zero). For this I'm using the cost function sigmoid_cross_entropy_with_logits. But for some reason the ...
0
votes
1answer
13 views

Keras backend function equivalent for str.format [on hold]

How to perform the following function using Keras backend? "{0:b}".format(37)
0
votes
0answers
4 views

Using two generative adversarial nets to classify articles - what is a good approach?

I'm trying to create a deep learning network to classify news article based on the text and associated image. The idea comes from a novel use of GANs to classify based on generated data. My approach ...
0
votes
0answers
10 views

ValueError: Cannot feed value of shape (32,) for Tensor 'Placeholder_1:0', which has shape '(?, 10)'

When I run this on my own PC it works. But, when I switch it to Google Colab it returns "ValueError: Cannot feed value of shape (32,) for Tensor 'Placeholder_1:0', which has shape '(?, 10)'" What's ...
1
vote
0answers
12 views

K-fold cross validation when using fit_generator and flow_from_directory() in Keras

I am using flow_from_directory() and fit_generator in my deep learning model, and I want to use cross validation method to train ...
0
votes
0answers
30 views

Tensorflow deep learning Weird Accuracy

I want to build a model to classify images of a dataset( ASL signs alphabet ). The dataset is in a folder where each sub-folder contains the images of a class and the name of the class is the name ...
1
vote
1answer
14 views

Is it appropriate to use polar images as input to CNNs? Or must they be Cartesian transformed first?

I have built a convolutional neural net which trains on data originally represented in polar space (measurements are a function of angle and distance). My pipeline begins by converting coordinates to ...
0
votes
1answer
15 views

Invalid Argument Error when running simple Convolutional Neural Network

I am running a convolutional neural network with CSV files as training and test input. I am getting a strange error that I cannot solve. ...
0
votes
1answer
18 views

how to save deep learning model and test it after training?

I have a CNN model written using tensorflow for python, the model is for classifying lung CT images (cancer/no-cancer), after training the model with training and validation data and get a reasonable ...
1
vote
0answers
19 views

same model gives different values

I built a MLP for classification problem. I used KDD99 dataset. but the problem is that when I run it it gives ech time a different value of accuracy. Is this logic? I mean could the same model for ...
1
vote
1answer
14 views

Is there a way to visualise what/how my image classifier has identified an image?

Using tensorflow. If I have trained my image classifier many images of a close up of melanomas and other skin cancers. Then ask it to classify using the trained model a photo that has another element ...
1
vote
1answer
26 views

How to display the value of activation?

I have built my network and would like to see how the activation of a particular layer change after each epoch of training. For example, as code shown below, I want to see the activation values of "...
4
votes
2answers
687 views

Should use sklearn or tensorflow for neural networks?

I have just started learning Neural Networks for deep learning from cs231. I am trying to implement Neural Network in Python. I am looking at using Tensorflow or scikit-learn. What are some pros and ...
2
votes
1answer
31 views

Is GEMM used in Tensorflow, Theano, Pytorch

I know that Caffe uses GEneral Matrix to Matrix Multiplication (GEMM) which is part of Basic Linear Algebra Subprograms (BLAS) library for performing convolution operations. Where a convolution is ...
1
vote
2answers
14 views

Setting batch size: training requires twice as much memory as validating

I am using Keras with a Tensorflow backend to train an Image Classification model on a GPU. I have read somewhere that training uses roughly twice (both forward and back props) the GPU memory of ...
1
vote
0answers
18 views

How to calculate the level of sparsity of a deep learning model (CNN/MLP)? [closed]

Recently I am studying on the sparsity of the deep learning model (CNN/MLP). I am using Tensorflow as the framework to build the models, but how to calculate the level of the sparsity of each ReLU ...
2
votes
0answers
13 views

Better to crop or compress training data?

I've been trying to make an object recogniser in Tensorflow and have used labelImg to classify large electrical transmission towers at varying distances. In order to make 10-16MP (~2-7MB) images train ...
1
vote
0answers
11 views

Is it possible to train for precision in Tensorflow?

Can I train a binary classifier in Tensorflow to maximize precision?
2
votes
1answer
23 views

To continue training an existing tensorflow model do I need to restore the session?

I'm trying to work out the best way to integrate with EC2 spot instances that can be started and stopped. Do I need to store the tf.session or can I just do ...
1
vote
1answer
20 views

tensorflow categorical data with vocabulary list - Expected binary or Unicode string, got [0,1,2,…]

I'm brand new to machine learning (having just completed the google machine learning crash course) and thought it would be good to try my hand at a Kaggle competition as a good starter to some real ...
0
votes
0answers
49 views

A2C with baseline does not learn

I have merged two code snippets into one to have a clean example of the CartPole example. But i did screw up somewhere (very novice in tensorflow and rl). Could maybe someone help me out finding the ...
1
vote
0answers
7 views

While using TensorFlow, is there some way I can 'create' the input values on the fly?

I use MySQL, I have a table that has some data in each row. For a TensorFlow model I need a new table with the data from one of the first tables' rows plus its 2 previous rows. One solution would be ...
0
votes
0answers
17 views

TensorFlow restored model returning constant negative prediction

I've trained a CNN model using Google Colab with TensorFlow. It is a pretty basic CNN: ...
2
votes
0answers
21 views

Tensorflow CNN sometimes converges, sometimes not

originally asked on stackoverflow, deleted Im having trouble traing a convolutional neural network in tensorflow. When I start my program, sometimes the model learns nicely (cost/cross_entropy goes ...
2
votes
1answer
31 views

getting error while installing install_tensorflow()

i am trying to install tensorflow in r library. when i try to install using ...
1
vote
0answers
10 views

Tensorflow.js mapping to Tensorflow (python)

Despite having no understanding of what I'm doing, I decided to take a shot at porting rnn-nlu to tensorflow.js A few lines in, and I'm really confused by the relationship between the python and ...
0
votes
0answers
4 views

How to display the architecture of a neural network created using Tf.estimator?

I have created a neural network using tensorflow's estimator API: ...
0
votes
0answers
14 views

How to create an ensemble in tensorflow using tf.estimator?

I have created a neural network using tensorflow's estimator API: ...
0
votes
0answers
6 views

Keras mulilabel classification loss function: how to get accurate val_acc using binary crossentropy?

I am following this tutorial on multilabel-classification using keras https://www.depends-on-the-definition.com/classifying-genres-of-movies-by-looking-at-the-poster-a-neural-approach/ Here it is ...
0
votes
0answers
13 views

converting a Tensorflow model for Tensorflow.js

(Warning, I'm a Tensorflow/ML noob) I'm trying to convert and load a TensorFlow model into tensorflow.js The model is saved: ...
1
vote
0answers
18 views

intent detection and slot filling using tensorflow.js

I'm still getting up to speed with machine learning, but I'm aware of the papers on joint intent detection and slot filling by Bing Liu & Ian Lane, and another by Xiaodong Zhang and Houfeng Wang - ...
0
votes
0answers
3 views

How to load and process string data in TensorFlowJS?

How to load and process string data in TensorFlowJS? I would like to create a model in browser, where user can highlight some string, Model can able to say the type, eg : Date, Time, Email, URL. I ...
0
votes
1answer
45 views

Error not decreasing in a 3 layer deep CNN using TensorFlow

I'm trying to train a CNN to play an online game by feeding images of the game along with the keyboard input. By playing the game for some time and collecting the data, I gathered 342 images with ...
1
vote
0answers
26 views

Converting video into frames using openCV

I am converting video into video-frames using the given code converting video into frames ...
1
vote
0answers
26 views

Adding layers in the middle of the deep learning model [closed]

I want to add new layers to a complex CNN model in Keras, how can I add a new layers in the middle of the sequential deep learning model?
0
votes
1answer
22 views

Confusion regarding epoch and accuracy

I have been learning keras and TensorFlow for some weeks now, and get confused with epoch. I trained my network for 50 epochs, the test data and training data are randomly split (80% train, 20% test)....
-1
votes
1answer
23 views

How to know if the deep learning model is overfitting or not?

I created a deep learning (CNN) model, I used data augmentation and two dropout layers (0.5). How to know if the deep learning model is overfitting or not?
1
vote
0answers
16 views

Evaluation code understanding in wide and deep model of tensorflow

I'm doing some research on the wide and deep model developed by Google. And I got 2 questions on the training and evaluation code fragment. (Complete code see here): ...
1
vote
1answer
31 views

Neural Network unable to track training data

I am new to ML and this is my first Tensorflow project. I am doing regression with Neural Networks on a dataset with 17 features and 1 outcome. But for some reason my network is unable to follow the ...
0
votes
1answer
16 views

Is it possible to make tensorflow print out everything it see in a given image and not just the top five results?

I'm working through the python API tutorials for Tensorflow and I'm seeing the results that are normally displayed, but it's always giving me the top five results. I'm trying to discern all ...
0
votes
0answers
16 views

Memory Run-out While Fetching Data

I am trying to reproduce deep video portrait(2018) and I'd already comprised model refererencing pix2pix(2017). I am borrowing V100 Volta 16GB GPU from the AWS and ...
0
votes
0answers
13 views

Memory Run-out While Fetching Data in AWS Volta GPU

I am trying to reproduce deep video portrait(2018) and I'd already comprised model refererencing pix2pix(2017). I am borrowing V100 Volta 16GB GPU from the AWS and ...
0
votes
2answers
36 views

Why is this TensorFlow CNN not generalising?

So I wrote a TensorFlow CNN by creating manual layers. It is not state of art, but a simple experimental setup. The problem is it is not generalising well, it is hardly generalising. This should not ...
0
votes
1answer
37 views

Accessing and Multiplying Individual Elements of a Layer's Output in Keras

Problem Description: I am trying to access the individual elements (i.e., scalar) from a softmax layer's output (with dimension (,2)) and multiply this with a tensor from another model, which has a ...