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
0 answers
11 views

its posible to reshape a 1 dim with 30 values to a 2 dim (6, 5) with numpy?

I'm working with tensorflow. The run function next_state = np.reshape(next_state, [1, [self.state]) returns ValueError: Cant reshape array of size 30 into shape (...
user avatar
1 vote
1 answer
22 views

Reproduce Keras training results in Jupyter Notebook

I am using keras and Jupyter notebook and want to make my results reproducible every time I ran it. This is the tutorial I used https://machinelearningmastery.com/time-series-prediction-lstm-recurrent-...
user avatar
0 votes
0 answers
2 views

How to re-write gradients calculation in GradientTape- tensorflow [migrated]

I'm trying to integrate a function which calculates the gradients following the Backpropagation algorithm using numpy, in a optimizer re-writing compute_grads methods or using decorate function @tf....
user avatar
1 vote
1 answer
61 views

Features and LSTM

I have a problem while developing an LStm model. I have 4 feaures that I want to use to make a prediction. When I test my model with a single feaure I get average results but when I test with all 4 ...
user avatar
  • 11
0 votes
0 answers
13 views

Multilayer/deep recurrent layer

I might be missing something, but I'm completely unable to find any reference about this topic. In the literature, there are many references about RNN, GRU, LSTM, STAR and many other architecture that ...
user avatar
1 vote
2 answers
26 views

Loss decreases, but Validation Loss just fluctuates

I've been trying to implement object detection using a CNN architecture like this: ...
user avatar
0 votes
1 answer
25 views

Odd error when training neural network with Keras - Error occurred when finalizing GeneratorDataset iterator

I'm attempting to train a neural network to evaluate chess positions. I have around 100 CSV files each with about 10,000 positions, leading to roughly 1,000,000 positions in total. Because of the ...
user avatar
1 vote
1 answer
18 views

How to stop deep learning speech model to not recognize stranger voice?

I am trying to figure it out. But I can't find any solution. My model accuracy is 99% and my testing accuracy is 98% I am using softmax for multiclass classification and adam optimizer to reach its ...
user avatar
0 votes
1 answer
16 views

Small difference in metrics in KERAS for the same model

I see that the MSE metric provided by the model.fit (history) is slightly different from the MSE calculated by model.evaluate? Can anyone help? ...
user avatar
0 votes
0 answers
16 views

How to classify data into multiple categories and a prediction of any one of those categories can be correct (Tensorflow)

I am trying to predict an NBA player's position using Tensorflow. The dataset that I have doesn't classify each player under one specific position, but rather any position that they played in their ...
user avatar
0 votes
0 answers
32 views

CNN model with images - 100% accuracy on validation and test sets with limited data?

I have a binary classification problem (e.g. if there is a human in the room or not) with a small dataset of images from a thermal camera. Originally, those were 7 videos, which I have converted into ...
user avatar
  • 101
0 votes
1 answer
14 views

How to further improve on overfitting?

Update: Please see below for my own answer I'm training from scratch a simple CNN multi-class classification (images taken from a small camera are black and white). I tried it with 2x conv layers and ...
user avatar
  • 111
0 votes
0 answers
10 views

Images get rotated during training

I am trying to train a ssd_mobilenet_v2_keras for object detection on a dataset of more or less 6000 images. The problem is that images are rotated randomly during training (or at least, this is what ...
user avatar
  • 101
1 vote
1 answer
35 views

Why can't I reproduce my results in keras using random seed?

I was doing a task using RNN to predict a time series movement. I want to make my results reproducible. So I strictly followed this post: https://stackoverflow.com/questions/32419510/how-to-get-...
user avatar
0 votes
0 answers
8 views

Can not get result from the Tensorflow hub module output_summaries

I have downloaded a news article highlights module from Tensorflow hub here : https://tfhub.dev/google/bertseq2seq/roberta24_cnndm/1 Now I am trying to get the results from this module as per the ...
user avatar
  • 1
0 votes
0 answers
7 views

Self cross a tensor and apply a mapping on each cell

Let's say I have a tensor t=[1, 3, 1] I want to self-cross it to produce a 3x3 matrix but each element of the matrix should be: 1 if ...
user avatar
1 vote
0 answers
17 views

Impact of small objects of multiple sizes on the performance of Tensorflow object detection API

I have asked the same question in StackOverflow. However, no one has answered the question yet. I am using Mask R-CNN with Inception ResNet-v2 from TensorFlow Object Detection API. However, the ...
user avatar
  • 11
0 votes
0 answers
7 views

Not able to restore attention model properly in a training loop

I am facing a problem with restoring training from the last checkpoint that was saved. I am following this code exactly except I am changing the dataset and increasing the epochs to 100. What do I add ...
user avatar
0 votes
0 answers
6 views

Modified resnet50 stays at 0.4031 every epoch

No matter what I change, the accuracy of this ResNet I have modified to perform binary classification seems to stay the same. Loss decreases slightly then fluctuates while accuracy is always 0.4031. ...
user avatar
0 votes
0 answers
12 views

How can I fine tune a model to detect digits, used to detect denominations of currency notes

So the task at hand is to detect the denomination of any currency banknote. The dataset I have is about 2k images of each denomination (12 in total). An example banknote (after noise removal, erosion ,...
user avatar
0 votes
0 answers
10 views

tensorflow: error with parallel channel model

I'm debugging a model I created to accept a variable number of input channels (each channel is an RGB image). I suspect that not all the channels are properly connected. Model code: ...
user avatar
  • 23
1 vote
1 answer
9 views

Sub labelling of an object

First timer in image processing - Pardon my cluelessness. Is there a concept of sub labeling in objection identification? I want to label a person and sub label "eye" of a person and train a ...
user avatar
  • 111
0 votes
1 answer
56 views

Tensorflow gpu not available for jupyter notebook

I am trying to make tensorflow work with gpu support. First I have tensorflow-gpu installed: However, there is no gpu available....
user avatar
  • 11
0 votes
1 answer
27 views

LSTM RNN regression: validation loss erratic during training

While training my NN, I am getting unfamiliar behaviors which I don't understand. Firstly: highly erratic validation loss while training loss goes down steadily. Secondly: training loss goes down very ...
user avatar
  • 1
0 votes
0 answers
85 views

ValueError: `labels.shape` must equal `logits.shape` except for the last dimension. Received: labels.shape=(880,) and logits.shape=(16, 3)

This is my multiclass neural network model. ...
user avatar
0 votes
0 answers
15 views

TypeError : Inputs to a layer should be tensor [migrated]

I am new to deep learning currently trying to learn neural network.However,I encountered this problem while training the neural network. This is the input .I thought by using the tensor Dataset I am ...
user avatar
0 votes
0 answers
16 views

Extracting Features Using TensorFlow(EfficientNet)

I am trying to apply the following model in this paper Owl classification paper on my own dataset. I already created Spectrogram Images and MFCC image from my own dataset, but I don't know. How can I ...
user avatar
  • 27
0 votes
1 answer
17 views

How to examine effect of variable not used in training a neural network

I am currently using tensorflow to create a neural network that does basic binary classification, and I would like to examine the bias of the model after training. I have a dataset of about 300,000 ...
user avatar
  • 21
0 votes
0 answers
16 views

Loading saved model fails

I've trained a model and saved it in .h5 format. when I try loading it I received this error ...
user avatar
  • 1
0 votes
0 answers
4 views

I have a folder with 25000 images with cats and dogs picture - how to use tf.keras.utils.image_dataset_from_directory?

I am using vats-vs-dogs data set where the subdirectories are not precreated. Only 1 folder with 25000 images. (cat.001.jpg.... etc then dog.342.jpg.... etc) all in one folder. There are no separate ...
user avatar
0 votes
0 answers
8 views

Why convolutional layer learns only biases?

I`m training a siamese CNN to distinguish between pairs of images and though my train/val binary cross-entropy loss values show negative trend, implying some of the model parameters are being updated, ...
user avatar
1 vote
0 answers
16 views

Val Loss and manually calculated loss produce different values

I have a CNN classification model that uses loss: binary cross entropy: ...
user avatar
  • 201
0 votes
0 answers
12 views

Keras model with 3 input images giving wrong output

I have created a keras model that takes 3 images as input, passes them to individual CNN backbone(mobilenet_v2) and fuse the results from 3 individual streams. These fused outputs further goes through ...
user avatar
  • 1
0 votes
0 answers
8 views

Input Signal Shape Optimization

I have a system, described by a black-box (a fully connected neural network), that takes as input a signal in time (let's say something similar to a sine wave) and returns a single scalar as output. ...
user avatar
1 vote
0 answers
9 views

Input-depending model on TensorFlow

I'm working on a TensorFlow model, and I would like to have different logic in the model depending on the input. My question is if it's possible to have a "dispatch" layer in TensorFlow that ...
user avatar
  • 489
1 vote
0 answers
26 views

How to determine the number of Neurons in each hidden layer and number of hidden layers for face recognition [duplicate]

I plan to build a CNN for face recognition using this Kaggle dataset. I tried building a model with a single hidden layer with 256 fully connected neurons, and it gave an accuracy of 45% after 55 ...
user avatar
0 votes
0 answers
14 views

How to overcome importerror for tensorflow

I'm working on ubuntu, and i'm trying to train my python model but i receive the following error ...
user avatar
  • 1
0 votes
0 answers
36 views

Can we combine two models in which one was implemented in tensorflow and other one in pytorch?, to see the results of 2 models simultaneously?

To further explain my question. I am implementing 2 models. 1 is for action recognition and the 2nd is for weapon recognition. If there is a situation where a person is punching or kicking someone and ...
user avatar
0 votes
1 answer
18 views

Preprocessing in TensorFlow

Good night, I am working on a paper comparing Python libraries for machine learning and deep learning. Trying to evaluate Keras and TensorFlow separately, I'm looking for information about TensorFlow ...
user avatar
  • 3
0 votes
1 answer
30 views

Keras loss object and shapes

I'm at a loss. I've been staring at this problem for a while and I'm unsure how to proceed. I've been constructing a script to train a model for object detection based on a dataset I've compiled. I've ...
user avatar
  • 1
0 votes
0 answers
11 views

Can I get un-normalized vectors from the TF USE model?

I'm using this Universal Sentence Encoder (USE) model to get embeddings of a set of texts, each text corresponding to a newspaper article. In order to build a Recommender System, I generate user ...
user avatar
0 votes
1 answer
34 views

Overfitting problem: high accurance and low accurancy validation for image classification

I want to define a model to predict 3 categories of images. I'm learnong on the field :-) I've 1500 images (500 for each category) in 3 directories. I've read in this blog many suggestions: use a ...
user avatar
1 vote
1 answer
25 views

How to analyse the accuracy and loss graphs of model history?

I want to understand how to analyse the loss and accuracy (any metric) graphs that we plot from the model training history. Here's my graph, What can we say from the slope of graph? Does it matter? ...
user avatar
0 votes
0 answers
21 views

Learning high bias in neural net

I have this simple model, which tries to predict constant $[1, 1, .. 1, 0, ..., 0]$ vector regardless of input. I found that model predicts it successfully if trained on input in $[0,10]$ range, ...
user avatar
0 votes
0 answers
15 views

Train an LSTM on separate sequences of different lengths

My case is the following: I want to train a sequential classifier to recognize what action is being performed given sensors observations.My data consists of 10 executions of an assembling task for 10 ...
user avatar
  • 131
0 votes
0 answers
81 views

Excessive GPU memory usage for Keras model.fit()

I am trying to use Keras to do some image analysis using the Xception model. When I run model.fit, GPU memory usage increases rapidly to 16 GB, despite my training data only being (7546, 299, 299, 3) ...
user avatar
  • 101
0 votes
0 answers
8 views

I am trying to save a trained model but its giving me this kind of error "NameError: name 'tfjs' is not defined" Can someone help me out?

This is the code I have written: ...
user avatar
1 vote
0 answers
16 views

TextVectorization and Autoencoder for feature extraction of text

I'm trying to solve a problem which is as follows: I need to train the autoencoder to extract useful data from text. I will use the trained autoencoder in another model to extract features. The goal ...
user avatar
0 votes
3 answers
76 views

How to verify if the behavior of CNN model is correct?

I am exploring using CNNs for multi-class classification. My model details are: and the training/testing accuracy/loss: As you can see from the image, the accuracy jumped from 0.08 to 0.39 to 0.77 ...
user avatar
  • 63
0 votes
0 answers
45 views

Keras/Tensorflow Error: Specified a list with shape [3,1] from a tensor with shape [32,1]

I have been experimenting with keras/tensorflow to build up my confidence and am currently trying to build a LSTM model that forecast the price of a stock based on the price of the stock in the ...
user avatar

1
2 3 4 5
42