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
0
votes
0answers
3 views

differentiating vector with different operation on each elements

I have some idea how backpropagation would work for loss function like loss=summation(predicted-true)^2. Where predicted and true are vector of same length and same ...
0
votes
0answers
13 views

How to use binary numbers and plain floats in the same neural network input for reinforcement learning?

I'm modeling a system whose configuration can be represented by a binary array ([1,0,0,1] or [0,1,0,0], for example), and the agent can move on a 2D space (thus having 3 DoFs), and the action the ...
0
votes
0answers
23 views

Interpretation of Loss and validation Loss in Keras

I am building a model to predict one label by taking one feature as an input. The two variables seems to be strongly correlated. I wanted to build a (sequential) Neural Network model with Keras in ...
0
votes
0answers
2 views

Use tf.image.ssim_multiscale for a batch of images in sequential model

I am trying to use SSIM as loss value for my Keras Sequential model. The output value is a set of 6 images - (6, 32, 28, 3). I want to implement a custom loss function for the model.fit() function but ...
-1
votes
0answers
10 views

How to train videos without split into frames?

I am a beginner to machine learning. I'm building a tennis stroke classification system using action recognition. The dataset consists of different stroke videos. In all the tutorials I referred, the ...
0
votes
0answers
12 views

Tf/Keras LocallyConnected layers

I recently stumbled upon these layers, and it's an interesting idea, but I'm not sure what one would do with it. What is the application of a Convolutional layer that doesn't share its weights? Where ...
0
votes
0answers
11 views

Keras EarlyStopping callback: Why would I ever set restore_best_weights=False?

The point of EarlyStopping is to stop training at a point where validation loss (or some other metric) does not improve. If I have set ...
0
votes
0answers
5 views

Manipulate output of 1 keras model and use that as input to second model

I am trying to merge two Keras Sequential model. The aim is to get output from 1 model, run the output through a function and then use that as an input to another model. I don't even know whether such ...
1
vote
1answer
17 views

Changing a list of tensors to a tensor of lists!

I have a list of tensors created by [some_function(x) for x in something] and this list becomes like this ...
0
votes
1answer
13 views

Dimension of output in Dense layer Keras

I have the sample following model ...
0
votes
0answers
19 views
1
vote
0answers
14 views

How would you optimize this Binary Text Classification model further? The data set is large (40000 texts)

I'm learning about tensorflow/keras since a couple months. What are some methods to reduce overfitting in the later epochs or increase val. accuracy in general? train data dim (40000,70) (reddit ...
0
votes
0answers
15 views

ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type int) [migrated]

I am trying to tune the hyperparameters of MLP sequential model but getting an error while performing this task. I have tried degrading/upgrading the scikit-learn version and using ...
0
votes
0answers
17 views

CNN seems doing good during training and validation but not really

I'm doing a simple binary classification using this dataset ...
0
votes
0answers
7 views

How to realize a 4 dimensional time series data classification

Assuming I am doing a speech binary classification. An audio file contains a different number of sentences. I am splitting the audio files by their sentences with padding to a fixed number of ...
0
votes
0answers
5 views

Gradient calculation of the pre-trained model

I have pre-trained tensorflow model in a graph format. I have not used tf.gradient on the graph structure. In such cases, is there any way to calculate the gradient of some tensors operation?
0
votes
0answers
13 views

Keras Reproducibility Problem on Jupyter notebook

I developed a model with Keras. However, every time I run the model from the beginning, I get different score values. I typed the code below to provide "reproducibility" but unfortunately, I'...
0
votes
0answers
23 views

Getting constant accuracies for training and validation sets despite their losses are changing during CNN training?

As the title clearly describes the issue I've been experiencing during the training of my CNN model, the accuracies of training and validation sets are constant despite the losses of them are changing....
0
votes
0answers
19 views

learn information from text and resolve problem using transformers

Let's imagine that we have some question, like this: "x multiplied by x equals 9. What is x?" For this easy question answer is +-3. I want to make AI model answer on questions like that. To ...
0
votes
1answer
24 views

Issue replicating AutoKeras StructuredDataClassifier

I have a model that I generated using AutoKeras and I want to replicate the model so that I can construct it with keras tuner to do further hyperparameter tuning. But I am running into issues ...
0
votes
0answers
13 views

Balancing on the particular imbalanced classes of image dataset

I have a dataset that has 12 classes in the base directory. However, these 12 classes consist of several amounts of Images. The number of images of 12 classes is inconsistent therefore its impacts the ...
0
votes
0answers
6 views

loss is neither increasing nor decreasing in siamese network

I am making a model which differentiate between two fingerprint(dataset) using simple siamese network but even after 400 epochs loss doesn't decrease. Loss is stuck at 6000 and accuracy is also not ...
0
votes
0answers
20 views

Error in Entity-Embedding of Categorical Variables

Code versions: python = 3.8.0 tensorflow = 2.2.0 scikitlearn = 0.23.2 I'm training a neural network on an all categorical dataset. Because of the sparsity caused ...
1
vote
0answers
6 views

Training with different datasets for the same better VAE model yields poor results

The VAE model I used here https://github.com/keras-team/keras-io/blob/master/examples/generative/vae.py. It can produce very well results for the minist and fashion minist dataset. But when I use my ...
0
votes
1answer
19 views

How to use data generator for regression keras?

I am using the Keras data generator to load data from a directory. I am basically dealing with a regression i.e there is a numerical value for each of my images in the range ...
0
votes
1answer
14 views

How to perform tokenization for tweets in xlnet?

X_train has only one column that contains all tweets. ...
0
votes
0answers
8 views

TF Estimator stop when overfitting?

With TF 1.x is there a way to stop training, when evaluation loss starts increasing? Or is there another way to detect overlearning? I know about the stop_if_no_decrease_hook, but it doesn't consider ...
0
votes
1answer
13 views

Why does keras.Model subclass behave differently to the sequential API?

I have implemented WGAN based on this blog. I tried to implement define_critic() as a subclass of keras.Model with the goal of having the same result. ...
0
votes
1answer
8 views

Ideas for model to predict wind speed in a local kitesurfing spot

We have a sensor in a local kite spot that captures real time wind speed, we've found that we can somewhat predict if there's going to be "good" wind by looking at different forecast models ...
0
votes
0answers
14 views

Image Embeddings Layer with Pre-Trained Model

I have some basic experience with embedding layers in NLP. However I would like to explore how can I use embedding layers to compare similarities between images. There are a few questions I am stuck ...
0
votes
1answer
14 views

Set seed for a Class that calls Keras Models

I have class that I use to optimize parameters of a Keras LSTM model. It is known that to set seed for keras, one must input the follow on its code. But what I'm not understanding is where to put it ...
0
votes
1answer
15 views

The sum of multi-class prediction is not 1 using tensorflow and keras?

I am studying how to do text classification with multiple labels using tensorflow. Let's say my model is like: ...
0
votes
0answers
10 views

Which checkpoint file to be used as starting checkpoint for retraining the model in Machine Learning?

I kept a Tensorflow Object Detection model on training to identify diamonds in an image. While training, checkpoint files are saved in Trainings folder. Checkpoints ...
0
votes
0answers
5 views

Using forecasting values of wind speed at different hours in the future to predict power output at different hours in the future for a wind turbine

I need to design a neural network model for a wind turbine which takes as input the forcasting values of wind speed as follows : windspeedPlus001hr , windspeedPlus002hr , windspeedPlus003hr , ...
0
votes
0answers
14 views

custom regularizer in Keras

I would like to implement custom regularizer in Keras/TF. Regularizer is suppose to prevent rapid change between weights of the neighbouring layers. Thus, it should have the following form: $$ R(K) = \...
0
votes
1answer
16 views

keras mnist dataset

I am learning Neural Network. I was running following source code ...
3
votes
1answer
49 views

Is there an appropriate use of adjusting class weights for a balanced dataset?

I ask this because I am currently working with a CNN model built for diagnosis of pneumonia. Originally, I followed a notebook on kaggle to build the model and thereby learn what each bit of code is ...
1
vote
0answers
18 views

Error raised in model.fit() if validation_data ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() [migrated]

I'm trying to run a simple autoencoder model. I'm reading training data from a csv which consists of word embeddings. I have this code, but the error in the title is raised in ...
0
votes
0answers
90 views

How to do NER predictions with Huggingface BERT transformer

I am trying to do a prediction on a test data set without any labels for an NER problem. Here is some background. I am doing named entity recognition using tensorflow and Keras. I am using huggingface ...
1
vote
0answers
9 views

TensorFlow Poisson error

I am trying to assume that my y variable has a Poisson distribution and I am using TensorFlow to do so. The model I have is as follows: ...
0
votes
0answers
12 views

How do we know that model learned those features from the image dataset in deep learning?

I am implementing image classification using TensorFlow.How do we know that model learned those features from the image dataset in deep learning. can we visualize that?
0
votes
0answers
10 views

NLP Style Transfer: Using my iMessage data to do predictive text generation in the style of my friends and family

So I wanted to use my iMessage data to train a model to see how the people I frequently text would fill in the blanks in sentences like "I am going to the [MASK]" or "I want to [MASK] ...
0
votes
0answers
5 views

Selecting time window for very different feature lengths

I'm doing my first steps with python, keras and a 1D time series classification. I can train a model, save it, apply it to validation or test data. I'll build my first implementation around this ...
0
votes
2answers
52 views

sklearn package with AttributeError: 'MissingValues' object has no attribute 'to_list'

I am currently trying to reproduce this tutorial on building a CNN based time series classifier for human activity recognition. My setup is: Windows 10, Pycharm IDE with a new project for this ...
0
votes
0answers
12 views

keras custom layer weights with variable input size

I am trying to create a custom layer in keras which gets 3D Tensors as input. However, the first dimension of the 3D tensor is variable eg - [12,128,157] , [20,128,157], [8,128,157]. The custom layer ...
0
votes
1answer
60 views

Sentence embeddings with LSTM to classify the sentences is not working

I am trying to build LSTM NN to classify the sentences. I have seen many examples where sentences are converted to word vectors using glove, word2Vec and so on here is an example of it. This solution ...
0
votes
0answers
22 views

How to convert RGB to One Hot encoding of Pixel in Pascal VOC Dataset?

I am trying to implement Semantic Segmentation on PASCAL VOC 2007 Dataset using Fully Convolutional Network. My Network outputs images of (Height, Width, Classes); but the training label masks are of ...
0
votes
0answers
19 views

Keras CNN always predicts the same output values, independet of the input

We train a Reinforcement Learning model that should always predict the next best action in each state. Somehow the training does not work since after a few games, the outputs for each of the actions ...
1
vote
1answer
54 views

Modifying U-Net implementation for smaller image size

I'm implementing the U-Net model per the published paper here. This is my model so far: ...
0
votes
1answer
19 views

Is my CNN model overfitting?

I'm training a standard CNN. Attached my training curve. My model: ...

1
2 3 4 5
36