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.

Filter by
Sorted by
Tagged with
5
votes
1answer
780 views

Keras Loss Function for Multidimensional Regression Problem

I am new to DL and Keras. I am trying to solve a regression problem with multivariate outputs (y shape (?, 2)) using Keras (tensorflow backend). I am having my confusion about how the loss is ...
0
votes
1answer
18 views

Ram usage of model keep increasing when training to previously trained model

Update It keep increasing when i load the saved model like this. return tf.keras.models.load_model("models/min__1576172002.model") and i am saving model using <...
0
votes
1answer
17 views

Can i build an image classification model where each image has multiple labels?

If I am building a model where I need to predict the vehicle, color of it, and make of it, then can I use all the labels for a single image and build my model around it. Like for a single image of a ...
0
votes
1answer
74 views

Resize instead of transposed convolutions

I'm trying to build a decoder version of ResNet, i.e. one that goes from the prelogits layer and attempts to recreate the image. I can get it working by using transposed convolutions, but the quality ...
1
vote
1answer
379 views

How should I construct a binary classifier for thousands of positive data and millions of unlabeled data?

So far, I have stumbled upon many advices and papers on PU Learning and Unary classification. TLDR: Does anyone have suggestions for specific algorithm or implementation for labeled data of only one ...
0
votes
0answers
13 views

Multi-output classifier using Tensorflow/Keras on tabular data

I have been tasked with combining a several classifier models we have into one model using deep learning (or something else). The reason for this is that, in future, it would be difficult to maintain ...
0
votes
1answer
11 views

the library 'transformers' works also with older version of Tensorflow?

i am working with Tensorflow version 1.14 and i would like to use the bert embedding. In order to do so, i was thinking to use the transformers library( https://pypi.org/project/transformers/) but i ...
0
votes
1answer
56 views

Tensorflow model works for classification but not for regression (all predictions equal the output layer bias)

I'm trying to build a model for FX prediction. It's giving some promising results for classifying each period as buy/sell/neutral. When used as a classifier, actual returns are converted to 0, 1, or ...
1
vote
1answer
384 views

How to create a dummy model in Tensorflow

I am a newbie in Machine learning. I found this example using tflearn somewhere. It is the part of the program where we initialize a dummy model before training ...
0
votes
2answers
404 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
0answers
10 views

Tensorflow: how to interpret Tensorboard profile? How to increase efficiency according to it?

I use Tesla K80 for training a DNN model built with Tensorflow 2.0. I want to speed up the training. I have already used tf.data.Dataset input pipeline. I'm not using TFRecords files though. From my ...
0
votes
1answer
19 views

Tensorflow Conv3D with variable input size

I have a hypotethical question: Is it possible to train Conv3D with variable input size? Sample dim = Length x Width x Depth ; Depth are fixed per each samples, let's say 500. However Length x Width ...
1
vote
0answers
11 views

Using Keras/TS for Multivariate Time Series Prediction w/ Univariate output?

I've been reading through a few tutorials for using Keras/TensorFlow for multivariate time-series prediction (primarily using LSTM models). One example uses air pollution as an example. In this ...
1
vote
1answer
31 views

How can I feed BERT to neural machine translation?

I am trying to feed the input and target sentences to nmt model, I am trying to use BERT ...
0
votes
0answers
25 views
1
vote
2answers
29 views

Training LSTM for time series prediction with nan labels

I have a time series of features x1,x2,x3,...,xn. I want to make a prediction y1,y2,y3,...,yn for each timestep. However, in my training data some of the y can be nan. I'd like the fit to just ignore ...
0
votes
0answers
15 views

Tensorflow API: What does the metric `tf.keras.metrics.TopKCategoricalAccuracy` do?

According to the API doc, this metric "Computes how often targets are in the top K predictions." But how come the following codes prouce the result 1? 0.95>0.9>0.8>0.1>0.05, both 0.95 and 0.8 lead ...
0
votes
2answers
399 views

How to convert model.h5 to model.pb?

I wrote in google-collab to get the model using keras, but I have to do predictions in Visual Studio using tensorflow I've search for a method converting models from keras .h5 to tensorflow .pb, but ...
0
votes
0answers
21 views

Whats the use of setting max_boxes in yolo_non_max_suppression()?

max_boxes is a positional parameter in tf.image.non_max_suppression(), see definition as given in the documentation here: "A scalar integer Tensor representing the maximum number of boxes to be ...
0
votes
1answer
305 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
60 views

Neural Network for regression with one dependent and one independent variable

I am trying to make a simple neural network with one dependent and one independent variable. Could you maybe give me a tutorial or help me with the implementation of a neural network with one ...
1
vote
2answers
55 views

Keras custom layer using tensorflow function

I was wondering if there is any other way to write my own Keras layer instead of inheritance way as given in their documentation? My colleague is more comfortable in tensorflow and he gave me a ...
0
votes
1answer
96 views

CNN image to image translation: multiple image inputs to one image output

I am interested in training a CNN to take in inputs where each input is a set of low-resolution images and each ground truth is a single high-resolution image. The ground truth high-resolution image ...
1
vote
0answers
63 views

Tensorflow simple neural network has very bad performance in regression (curve fitting) problem

I'm trying to implement a very simple one layered MLP for a toy regression problem with one variable (dimension = 1) and one target (dimension = 1). It's a simple curve fitting problem with zero noise....
2
votes
1answer
95 views

How do I use rnn to forecast to n periods with limited data?

So this is my 1st time trying to run a small time-series dataset through an RNN, but after a lot of searching, I haven't been able to find, 1. How I can use this to forecast to n periods ? (like in ...
2
votes
1answer
77 views

Keras - Implementation of custom loss function with multiple outputs

I am trying to replicate (a way smaller version) of the AlphaGo Zero system. However, in the network model, I am having a problem. The loss function I am supposed to implement is the following: $$l = ...
2
votes
1answer
47 views

How can we reduce the GPU memory usage when the model is already small enough?

I trained a model and froze it into a PB(protocol buffer) file and a directory of some variables, and the total size is about 31M. We deployed it using a GPU card and followed this answer and set the <...
1
vote
0answers
28 views

SymbolicException: Inputs to eager execution function cannot be Keras symbolic tensors

I am writing Encoder-Decoder architecture with Bahdanau Attention using tf.keras with TensorFlow 2.0. Below is my code This is working with TensorFlow 1.15 but getting the error in 2.0. you can check ...
0
votes
0answers
11 views

Tensorflow keras LSTM bad predictions [closed]

I am not sure what i am doing wrong. I am trying to do Time series forecasting using Tensorflow keras LSTM Here is my Loss: Here is my forecast against true data Activation function: relu ...
0
votes
0answers
14 views

Tensorflow LSTM bad predictions [closed]

I am not sure what i am doing wrong. I am trying to do Time series forecasting using Tensorflow keras LSTM Here is my Loss: Here is my forecast against true data Activation function: relu ...
0
votes
0answers
11 views

Multiple integer output for neural network [closed]

I have a data set that contains 104 input features and 96 output values ​​to be predicted, the input features are floating values ​​normalized to [-1,1], and each out put value would be one integer ...
2
votes
1answer
549 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 ...
0
votes
2answers
22 views

How to fit integer output in neural network

I have a data set that contains 104 input features and 96 output values ​​to be predicted, the input features are floating values ​​normalized to [-1,1], and each out put value would be one integer ...
3
votes
1answer
595 views

How do I create a Keras custom loss function for a one-hot-encoded binary classifier?

I have a CNN binary classifier with one-hot-encoded labels that I've written using Keras and it's just not training to the metric I want to encourage. My data is very imbalanced (91% class 0, 9% class ...
2
votes
1answer
43 views

How can I know the name of the features selected by a Deep Belief Network?

I want to use DBN to reduce the 41 features of nslkdd dataset after transforming nominal data to numeric the number of features increases from 41 to 121 . I used 3 RBMs (121-50-10) now I want to know ...
5
votes
1answer
7k views

Which convolution should I use? Conv2d or Conv1d

I've dataset which contains dlib landmark points of the faces. I'm using keras to train a model. The dataset shape is (length_of_dataset,68,2). I know that I've two options. The first is using ...
7
votes
3answers
9k views

TypeError: Expected binary or unicode string, got [

ERROR SUMMARY: I'm getting the following error: TypeError: Expected binary or unicode string, got [ BACKGROUND: I have several features that are histories of ...
1
vote
2answers
448 views

error when input function called with shape (2,2)

I am new to Tensorflow and machine learning. I am trying to use high level API from Tensorflow. Please tell me what i am doing wrong. ...
0
votes
0answers
14 views

Audio Analysis - Training the model - Tuple Index out of Range Error

I am trying to analyse an Audio file and train the system based on that extracted features but I am getting an error while Fitting the model saying "Tuple Index out of Range". I have provided the ...
0
votes
0answers
27 views

Input data for BERT model using Tensor flow implementation

i'm implementing BERT using Hugging face transformers method and tensorflow . in the tutorial they've published the input of data need to be in the form of tf.dataset method or InputFeature object. ...
1
vote
2answers
30 views

Solutions for big data preprecessing for feeding deep neural network models built with TensorFlow 2.0?

Currently I am using Python, Numpy, pandas, scikit-learn to do data preprocessing (LabelEncoder, MinMaxScaler, fillna, etc.), and then feeding the processed data to DNN models built with Tensorflow 2....
35
votes
3answers
36k views

Multi GPU in keras

How we can program in the keras library (or tensorflow) to partition training on multiple GPUs? Let's say that you are in an Amazon ec2 instance that has 8 GPU's and you would like to use all of them ...
1
vote
1answer
27 views

When to use deep learning for java as opposed to python

I have been asked to explore options to build deep learning based applications using java, so i happend to browse a website called dl4j (https://deeplearning4j.org) which has got implemantations of ...
1
vote
1answer
337 views
2
votes
1answer
415 views

How to choose the best optimiser in Deep Learning algorithms?

I have been training a CNN to classify 4 faulty (acoustic emission/250KhZ) signals. I have no problem in implementing the algorithm using tensorflow libraries, but I am confused with which optimizer ...
1
vote
1answer
24 views

Approach fpr extracting/cropping features images using deeplearning and no annotations

Let's say I want to have a bunch of images of hats from videos. How would I priniciple build something that would learn to recognize, and crop or bound box hats? I heard you need a dataset with ...
1
vote
2answers
32 views

“Super” Optimizer concept

I was wondering why there isn't a feature built into common-use ML libraries, like Keras, that plugs many different combinations of layers and nodes to multiple models and trains them simultaneously ...
1
vote
1answer
321 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 ...
1
vote
1answer
68 views

Keras mnist.load_data() unshuffled?

I want to do some data augmentation on MNIST and therefore must manually label the Y set. This can be automated if MNIST is unshuffled, however mnist.load_data() appears to be returned in a shuffled ...
1
vote
1answer
24 views

Keras LSTM Input Shape - Batch Size and Time Step

So I have 82 different sets of data, each with varying length where each point has one feature and a label (0 or 1). I'm trying to use Keras LSTM to be able to predict the class of a point depending ...