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

Questions tagged [tensorflow]

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.

0
votes
0answers
10 views

4 Dimension Input to NN

I am writing a neural network that takes an input of (?, 5, 19, 400) where ? is the batch, then we have a beam of 5 programs, 19 tokens, and 400 features per token. The idea is to have the neural ...
0
votes
1answer
19 views

Unsupervised learning from images

I want to design a model that can detect the different feature in the images, let's consider we have ~100000 images of cows. when I give this images to the model it has to identify different parts of ...
0
votes
0answers
6 views

Why does my custom categorical cross-entropy explode with Keras while not with TensorFlow?

I'm trying to train various Keras models on Pascal VOC 2012 dataset. The particularity of this dataset is that there is a particular class used to label "ambiguous" regions. These pixels are meant to ...
0
votes
0answers
15 views

Is it better to cluster an image based on a feature vector or logits?

My end goal is to use supervised machine learning to find visually similar images, trained on a data set that I curated. I followed the guide here: https://www.tensorflow.org/hub/tutorials/...
0
votes
0answers
11 views

Protocol Buffers vs Hierarchical Data Format API performance

I have several models in .h5 file format. I need to expose them through REST API. Apparently, there are two options: Serve directly from ...
0
votes
2answers
14 views

Keras y-labels range between 0 and 1 instead of binary?

I have X values and corresponding y-labels, until now I used to round my labels <0.5 to 0 and >0.5 to 1. Is it possible to use values between 0 and 1 for "y train"? Using Keras and Tensorflow. ...
0
votes
0answers
6 views

Convert generator to DirectoryIterator in Keras

I created a multi input deep learning model, and a lot of functions I could not use it because the testgenerator (in the code) is a generator not a DirectoryIterator. ...
1
vote
0answers
10 views

Transformer architecture not working on toy problem

My transformer is not working on a toy problem. Toy problem Input : Sequence of random integer, one-hot-encoded. Example : ...
0
votes
1answer
27 views

How to handle noisy data?

I have X values such as [0.2, 0.1, 0.3, 0.5, 20, -0.2, -0.1, -0.6, -0.8, -30] Now I know that if the abs value is below a certain threshold, let's say 2, the y-...
1
vote
0answers
5 views

Confused about transpose convolution and tensor shapes in tensorflow GAN tuturial

https://github.com/tensorflow/tensorflow/blob/r1.11/tensorflow/contrib/eager/python/examples/generative_examples/dcgan.ipynb class Generator(tf.keras.Model): def init(self): super(Generator, ...
0
votes
1answer
19 views

How to decrease CNN model error (lose) rate

My CNN model trained on ct scan dataset of 8000 samples,the model achieve nearly 90% of accuracy but the loss rate is high the average cost in 50 epochs is about 0.30, I use L2 regularization and ...
0
votes
1answer
22 views

Tensorflow and Sklearn

Is there a way to feed tensorflow tensors into a sklearn model? I have the following model to set up data compression: ...
1
vote
1answer
43 views

How to make my Neural Netwok run on GPU instead of CPU

I have installed Anaconda3 and have installed latest versions of Keras and Tensorflow. Running this command : ...
1
vote
1answer
20 views

Wave form analysis ML algorithm [on hold]

I am trying to determine a person's emotions from their speech. This immediately rings Machine Learning bells and the first step in any ML problem is getting and processing data. My first question is, ...
1
vote
1answer
21 views

Training images with multiple channels

So I have a set of images with 16 layers each. Is there a good reason to split the channels in a format like example : [images_length,16,image_width , image_height] instead of creating something ...
0
votes
1answer
23 views

Extracting embeddings of Categorical Variables

I am trying to build a regression model, for which I have a nominal variable with very high cardinality. I am trying to get the categorical embedding of the column. Input: ...
0
votes
0answers
13 views

How to group text categorical data basis on clustering?

So if I have text dataset where I have more than 50 categories. Sample: ...
3
votes
0answers
51 views

What is the best way to read SQL dataset in to Tensorflow?

What is the best way to read SQL database in to Tensorflow? Currently, I am using Postgres on server and developed DL algorithm on Tensorflow using Jupyter Lab. How can I import data into Jupyter Lab ...
0
votes
0answers
26 views

Normal Distribution Not working

I am using tensorflow to create a two layer network. I am using tensorboard to visualize the weight distribution and ensure it is created correctly but the weights on layer2 look wrong. They are ...
0
votes
0answers
8 views

Prevent predict_generator from shuffling data in deep learning

I created a cnn model, and I want to check the performance of the model by using predict_generator. I am using the following code which compares the images' labels ...
0
votes
1answer
14 views

How to increase accuracy of model from tensorflow model zoo?

Situation: My dataset is 70k images of people wearing clothes. Images are labeled: bbox position and class. There are 10 classes. I did 80:20 split. Categories are balanced with exception of one ...
0
votes
0answers
13 views

How can i take advantage of google Speech Commands dataset

I am building a Simple audio recognition for key word spotting taking inspiration from here.Apart from the dataset available Speech Commands dataset. i would also like to add words like "move" and a ...
0
votes
0answers
18 views

LSTM regressor seems to clip predictions

I have built a LSTM regressor with an average absolute error of 8%, what I find not bad since it is the first model... However, looking at the predictions, the network seems to be clipping them, I'm ...
0
votes
0answers
22 views

How to let predict_generator make ordered prediction when using functional API model in deep learning?

I am designing a deep learning model to classify images and I am using the following code to check the predication performance. It compares the images' labels with the predicted classes and then ...
2
votes
1answer
47 views

Visualizing word embeddings

I am working on a text-classification problem, and trying to understand how to work with the tensorboard projector for an embeddings layer in Keras. Borrowing an example from the Deep Learning with R ...
0
votes
0answers
3 views

Step to convert image to Tensor in Java [migrated]

Loading image as RGBs representation as input for neural network is quite easy in python thanks to great libraries. I am looking for common and user friendly solution in Java. There is much less ...
2
votes
1answer
26 views

Can I use a GAN to increase my Dataset used for Image detection?

I am currently working on a machine learning project where I use the YOLO Algorithm to detect an object inside of a picture or video. The problem I face is that the specific image set (side-scan sonar)...
0
votes
0answers
17 views

neural network f1 score 0.0

Problem at hand: Binary classification Approach taken: deep learning (tensorflow) Issue: F1 score 0.0 for both training and ...
0
votes
0answers
12 views

Policy gradient - and auto-differentiation (Pytorch/Tensorflow)

In policy gradient, we have something like this: Is my understanding correct that if I apply log cross-entropy on the last layer, the gradient will be automatically calculated as per formula above?
0
votes
0answers
16 views

Getting NaN output on test predictions, first attempt at building a model

I have been successfully following the tutorial examples on the Tensor Flow site and decided to implement my first model based on the Regression example of the Boston Housing data set. I have split ...
0
votes
0answers
13 views

Getting NaN output on test predictions, first attempt at building a model

I have been successfully following the tutorial examples on the Tensor Flow site and decided to implement my first model based on the Regression example of the Boston Housing data set. I have split ...
0
votes
0answers
19 views

Transfer Learning - Retraining - 98.9% test and validation accuracy but failing on real data completely

I have around 5000 classes and I retrained a CNN, but it did not classify. So I split the classes and have decided to use multiple nets for batches of 500 classes. I cannot get real images so have to ...
0
votes
0answers
6 views

Theoretical underpinning behind Hardmax operator

In the tensor flow Github repository, in the file attentionwrapper.py, hardmax operator has been defined. On the docs, it has been mentioned tf.contrib.seq2seq.hardmax I want to know what's the ...
0
votes
0answers
5 views

Cannot read .7z file in Google Colab [migrated]

I am using Google Colab to create a deep learning model, and I face an issue when I run this code at the first time. !p7zip -d filename.7z I get the following ...
3
votes
2answers
73 views

How to use a NN architecture that is too big for GPU?

Initially posted in Stack Overflow. I would like to implement a model which is actually 2 neural networks stacked together. However the size of these 2 architecture is too big to fit in GPU at the ...
1
vote
1answer
29 views

Does image resizing lower the prediction accuracy of MLP?

I am implementing a vanilla neural network (MLP) to do image classification in python using tensorflow on images of honey bees to detect their health status. The images in my dataset are of different ...
1
vote
0answers
15 views

How to predict a None (not in the categories)?

Im using tensorflow.keras I made a model that can predict cat and a dog but when I try to predict image without dog or a cat I still get an answer of a cat/dog. I tried find the % value of the ...
0
votes
3answers
50 views

Using deep learning or random forest [closed]

I am very new to machine learning, and I am trying to build a model to classify this data set (UCI heart disease). I have built a simple model using random forest and got an 80% accuracy. The size of ...
0
votes
0answers
21 views

Combining time-series lstm

I have time series LSTM, which makes fair predictions and might be a first-run model for my needs. An issue that I have is that I have multivariate analysis per user , and so far the LSTM is only ...
0
votes
0answers
18 views

How to improve regression accurazy of LSTM and Dense with tensorflow and keras

I am using tensorflow with keras to perform regression on some historical data. Data type as follows: id,timestamp,ratio "santalucia","2018-07-04T16:55:59.020000",21.8 "santalucia","2018-...
0
votes
0answers
21 views

Multi-input Convolutional Neural Network for Images Classification

I am beginner in deep learning and I want to create a multi-input Convolutional Neural Network (CNN) model in Keras for Images Classification. I am working to create a CNN model that takes two ...
1
vote
1answer
36 views

TypeError: Expected binary or unicode string, got array [closed]

I am trying to convert an array containing images into a tensor, but I'm getting error "TypeError: Expected binary or unicode string, got array" images.shape = (10,) images[0].shape = (375,500,3) ...
1
vote
0answers
36 views

Using Keras masking layer with 2D convolutions (Conv2D)

I'm trying to design a neural network including time dependent input with different lengths and I'm currently using a Masking layer. This network worked well with TensorFlow version 1.9.0 but after ...
0
votes
0answers
11 views

Implementing lookahead convolution - Tensorflow

I am trying to implement this research paper in python using Tensorflow. I am stuck at the lookahead convolution part. I have defied a weight matrix of shape ...
2
votes
0answers
48 views

How does the multi-input deep learning work?

I have a multi-input convolutional neural network model that inputs 2 images from 2 datasets to give one output which is the class of the two inputs. The two datasets have the same classes. I used 2 ...
1
vote
0answers
20 views

LSTM/RNN seems to be failing at testing

I'm relatively new to ML, keras and tensorflow and I working with a dataset (kerastest.csv) that is 400 lines of this ...
1
vote
0answers
31 views

How to train a multi inputs deep learning model using every combination of inputs? [closed]

I am beginner in deep learning. I want to create a multi inputs CNN model in Keras. The model takes two inputs of images to give the two images class. The two images from differnt datasets that have ...
0
votes
2answers
59 views

Understanding why my binary classification is approaching 50% accuracy using TensorFlow and Keras

I'm using the EMBER dataset (malicious and benign binaries). I used the built in EMBER code to vectorize the data and then filtered the unlabeled from the training data. https://github.com/...
2
votes
2answers
54 views

CNN not learning properly

Before marking my question as duplicate, I would like to say that I have tried all the possible solutions mentioned in similar questions, but that doesn't seem to work. I am currently working on ...