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
5 views

Keras.engine.topolgy import Node equivalent in tensorflow 2.X

I am trying to convert an old code written in Python 2 and tensorflow 1.x into the new tensorflow 2.X and python 3.7.9. There is a line of code ...
0
votes
2answers
18 views

ValueError: Input 0 of layer conv1_pad is incompatible with the layer: expected ndim=4, found ndim=3. Full shape received: [None, 224, 3]

I am trying to make a gender classifier. I am using MobileNet from Tensorflow with input shape as (224,224,3). After training the model, I tried to check if the model was working by passing an image ...
1
vote
1answer
19 views

How to improve performance of Tensorflow's CNN example? [closed]

In the example in this link: https://www.tensorflow.org/tutorials/images/cnn, the performance is over 70%, how can I improve it? What parameters do I need to tweak? Thanks.
0
votes
0answers
7 views

Changing order of input dimension in Tensorflow 3-D Layers

According to the official documentation of tf.keras.layers.Conv3D 5+D tensor with shape: batch_shape + (channels, conv_dim1, conv_dim2, conv_dim3) if data_format='channels_first' or 5+D tensor with ...
1
vote
2answers
15 views

TypeError: Expected sequence or array-like, got <class 'tensorflow.python.keras.callbacks.History'>

I am training a CNN, it runs well but I get an error when I try to get precision_score, recall_score and the ...
1
vote
1answer
13 views

Is it possible to make use of the CPU RAM, if i'm running of of VRAM, in tensorflow?

I want to train a model running on tensorflow. I have a GPU but it only has 6gb of VRAM. So i was wondering if it is possible to use some of the CPU's RAM to offload the GPU? I know it will be much ...
0
votes
1answer
21 views

ValueError: Shapes (None, 7, 7) and (None, 7) are incompatible

I am new to deep learning. I have been trying to train a VGG16 model to detect different emotional categories from a CSV Dataset. However, When I run the code for fitting the model below ...
1
vote
0answers
14 views

How much memory will be required to train EfficientDet D7 for object detection?

I am planning on doing some object detection once I collect my image database and annotate the images. I'm going to use the TensorFlow 2 detection Model Zoo, as it offers a great selection of pre-...
0
votes
0answers
6 views

Google Colab Pro getting crashed

I am using GoogleColab Pro to train the model for image classification. I have configured TensorBoard inside google colab to debug my model but when I run tensorbord command inside google colab it ...
0
votes
0answers
17 views

Mask RCNN 1 class only

I am looking to use only one class, person (along with BG, background), for the Mask RCNN object detection. I am using this link: https://github.com/matterport/Mask_RCNN to run the mask rcnn. Is ...
1
vote
0answers
25 views

Tensorflow: How to load/restore a FULL model (.pb, .pbtxt, .graph, .ckpt, variables, events)?

I recently switched from PyTorch to TF (1 and 2) and I am trying to acquire a good workflow with it. The simple things I want to do are the following: Load a full pretrained object detection model ...
0
votes
1answer
17 views

How to create custom Keras metric using multiple functions with numpy arrays and matrices?

I'm training a model for predicting position and orientation using regression. I want to implement custom metric using last 3 values of model output to calculate and minimize angular error defined by ...
1
vote
0answers
16 views

Machine translator giving only on character as output for all the words

I had trained a machine translation model using 1.4 million examples.( hindi to english ). strangely the loss plateaus at the same point 0.8301 and while trying the inference the output is always the ...
0
votes
0answers
9 views

ValueError: array length 13996092 does not match index length 214200 for Kaggle submission

My model is based on the model linked here on Kaggle. Specifically, the following lines of code to generate an uploadable table to make my submission: ...
0
votes
0answers
20 views

Keras - add_weight() method not adding to total model parameters

I am creating a custom Keras layer FConv2D(), and adding a weight in its build() function using the add_weight() method as suggested in official Keras tutorial for creating custom layers. ...
1
vote
0answers
44 views

Region Proposal Network - How to subsampling 256 fg/bg anchors

I am trying to understand training process of RPN. I have problem with creating mini batches of 256 anchors. If features map has shape 18x25=450 and every position has 9 anchors it is 4050 potential ...
0
votes
1answer
15 views

Import image into Tensorflow model [closed]

I trained a simple Handwriting model with Tensorflow and MNIST: ...
0
votes
0answers
8 views

Series Through a GPU's Window To, For Each Item, Output a Prediction and Retrain?

Perhaps I'm missing something obvious but I've not run across a Keras or PyTorch example of online training and series prediction loop implemented on a GPU with these (seemingly obvious) ...
0
votes
0answers
3 views

How to use model.save() method in tensorflow (custom model, arbitrary input shapes, “training” parameter in call()) [migrated]

I am stuck on a problem where I want to save a custom model that is trained using a custom training loop that needs to both be able to take in arbitrary input shapes during inference, and also be able ...
0
votes
0answers
19 views

object detection algorithm for video

Is there any way to convert the detected object from an object detection algorithm (Mask RCNN in my case) to a white silhouette (while the background has been set to black)? I have commented on the ...
0
votes
0answers
6 views

How to run inference of 2 deep learning models simultaneously on video?

I want to get inference of 2 models. First model(Runs at 20fps, Pytorch), Second one is a heavier model(Inference time 1 sec, Tensorflow) on webcam feed. The first model would be running on every ...
0
votes
1answer
11 views

Unable to use pip package obtained from building Tensorflow 2.3 from source

I've managed to build Tensorflow 2.3 from source, following these instructions: https://towardsdatascience.com/how-to-compile-tensorflow-2-3-with-cuda-11-1-8cbecffcb8d3 But, when I install obtained ...
0
votes
0answers
22 views

For SHAP (SHapley Additive exPlanations) which one is the positive and negative class?

My CNN model has to classify data into 3 classes say A, B & C which is one hot encoded. ...
0
votes
0answers
27 views

Custom Machine translation not giving correct output even when using the training data for prediction

Python : 3.7 Tensorflow : 2.3 model : ...
-1
votes
0answers
21 views

How to visualise and choose parameters spectrogram tensorflow

I have audio of 3 min duration ,I have Waveform shape: (2880000,) so what should be the value for frame_length and frame_step ...
1
vote
0answers
21 views

Top-K vs AUC - communicating results and next steps [closed]

I have a bi-LSTM multi-label text classification model which when training on a highly imbalanced dataset with 1000 possible labels gives a top-k (k=5) categorical accuracy of 86% and a focal loss of ...
5
votes
2answers
128 views

Transformer model: Why are word embeddings scaled before adding positional encodings?

While going over a Tensorflow tutorial for the Transformer model I realized that their implementation of the Encoder layer (and the Decoder) scales word embeddings by sqrt of embedding dimension ...
3
votes
0answers
38 views

What is the difference between trax vs tensorflow?

What is the main difference between trax vs tensorflow? both of them deep learning library and implemented by google team. https://github.com/google/trax https://github.com/tensorflow/tensorflow
0
votes
1answer
20 views

What is the difference between cache() vs prefetch() in tensorflow?

I have gone through the TensorFlow documentation. What is the difference between cache() vs prefetch() in TensorFlow? When ...
1
vote
1answer
20 views

How to detect misclasification data after multiclass classification?

I have trained a neural network multi-class classification model with around 150 classes having around 85% accuracy. Once the model is trained and deployed, it's predicting on new data and I am saving ...
0
votes
1answer
21 views

How to convert input numpy data to tensorflow tf.data to train model in tensorfow?

I am working on an image classification problem using TensorFlow. I have converted my input image dataset and label into NumPy data but it takes more time and more ram to load all the data into memory ...
0
votes
0answers
14 views

How to figure out what metrics I can monitor while setting Keras Callbacks?

I am trying to figure out whether I have a host of metrics available to monitor out of the box while writing callbacks such as ...
0
votes
0answers
11 views

Keras ModelCheckpoint Callback returning weights only even though both save_best_only & save_weights_only are set to False

I am trying to understand what happens here when I use the Keras ModelCheckpoint callback without setting either save_best_only & save_weights_only to True. i.e. ...
0
votes
0answers
5 views

LSTM validation loss always locked into zero

I have been working on an LSTM problem based on this Kaggle solution: https://www.kaggle.com/karanjakhar/simple-and-easy-aprroach-using-lstm And my dataset preperation is pretty much the same. The ...
0
votes
0answers
19 views

How to get true positive, true negative, and false positive false negative rate correctly using Keras?

I'm using Keras to do binary classification, and the label was encoded using one-hot encoding. I tried to get the number of True Positives, True Negatives and false positives and false negatives using ...
0
votes
0answers
5 views

How to choose the correct data's shape for time series with Keras

I would like to create an LSTM using Keas, which takes as input a multivariate time series. Following that example, we can see ...
0
votes
3answers
49 views

Converting a speech recognition model from CNNs to GRUs

I am trying to convert the simple audio recognition example from TensorFlow to use GRUs instead of CNNs. The idea is to classify an audio clip onto a set of 8 labels: ...
1
vote
1answer
14 views

Getting prediction labels from TensorFlow 2 ImageGenerator

I have created Image Generators that I used for training on labeled data. Now I want to make predictions on unlabeled data using the generators. I created a test generator as follows: ...
0
votes
1answer
18 views

Microsoft custom vision vs Tensorflow model?

I am planning to implement my own image classifier model using TensorFlow instead of a custom vision platform. what is the biggest difference between custom vision(https://www.customvision.ai/) vs ...
1
vote
1answer
49 views

How to load all images using image_dataset_from_directory function?

I am working on a multi-label classification problem I faced memory issues so I want to use Keras image_dataset_from_directory method to load all images as batch. how to apply multi-label technique on ...
0
votes
0answers
10 views

Simple DQN to slow to train [migrated]

I have been trying to solve the OpenAI lunar lander game with a DQN taken from this paper https://arxiv.org/pdf/2006.04938v2.pdf The issue is that it takes 12 hours to train 50 episodes so something ...
1
vote
0answers
52 views

“Failed to find data adapter that can handle input” when working with mixed data

I have been trying to make my own generator that would handle an [image, float] value for the x (input), while the y is an int (linear output). My data is compiled into a ...
0
votes
0answers
11 views

What is the best way to integrate our classes with mscoco classes?

I am using object detection api (https://github.com/tensorflow/models/tree/master/research/object_detection) with efficientdet-d0. I am interested with one class in MSCOCO (say class C), and two ...
2
votes
0answers
21 views

TensorFlow - TFRecords load and transform images with bounding boxes

I'm trying to build a 'Car Classifier' using TensorFlow. I have 1000 labelled JPG images, 800x800, complete with bounding boxes and associated annotations.coco.json; split into train/validate/test ...
1
vote
1answer
22 views

Keras, re use convoluted layers training for various flattened layers training

I want to train a range of models, that are very similar; the convoluted layers are the same but the flattened part changes. Example; different density, initially I have ...
0
votes
1answer
41 views

How many images can be trained in Google Colab? [closed]

I am using the ResNet50 pretrained model to train my images using TensorFlow. I have 70k images and upgraded to Google Colab Pro, but still I am facing a memory error. So how many images I can train ...
0
votes
0answers
18 views

Defining input shape in TensorFlow layers

I am trying to code my first TF program using Fashion-mnist data. In doing so i have some doubts regarding the usage of parameters while creating the layers. Irrespective of me defining the first ...
1
vote
1answer
31 views

How can I predict rank of a team based on list of team members and past placement?

I just started with ML, so this could potentially be a pretty stupid question, plz forgive me. Here's the gist of the problem: I have a list in json format like this: ...
0
votes
1answer
34 views

Improving the pix2pix Architecture for Sketch to Image Translation on a Dataset of Sketches of People to Photos of People

For a university project I need to create a neural network which translates sketches of people into images. In order to implement such a neural network, I decided to implement a pix2pix GAN ...
0
votes
1answer
33 views

high accuracy on non trained class in tensorflow model

I have trained a 4 multi-class (apple_nature, apple_disease, apple_blacrot, apple_healthy) image classification algorithm using TensorFlow. However, after training, we get a good accuracy model. The ...

1
2 3 4 5
33