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

Is there a way for CTC to output different types of blanks?

I am using a CTC loss for math handwriting recognition in Tensorflow/Keras. The output consists of a sequence of symbol ids, with a spatial relationship between every pair of consecutive symbols. For ...
0 votes
0 answers
10 views

How to get same output with reference model

I have a tflite model which was working with a random script on swift and I decided to add some more classes on an object detection aim. Training with the new classes didn’t work. The first model was ...
  • 1
0 votes
0 answers
35 views

Weighting and loss function for multi-dimensional output on ECG neural network in Tensorflow

I am working on a DNN that is training on ecg data with a shape of [None,1,2500] and output shape of [None,12,19] where 19 is a ...
0 votes
0 answers
8 views

multiple classification with LSTM in tensorflow js

I am learning tensorflow js, and I try some new things to me: The situation: I generate false data of this type: ...
1 vote
1 answer
20 views

How to bias a neural network towards one category in binary classification?

I have a basic sequential neural network built with TensorFlow. ...
0 votes
0 answers
10 views

Can't find the suitable compatible version?

I am working on a research and for that I had to find three different compatible version of tensorflow federated, tensorflow and also tensorflow quantum and I tried all of the different version. ...
0 votes
0 answers
14 views

TensorFlow Attribute error

I am trying to learn to solve differential equations with TensorFlow. Can anyone tell me how to correct this error from PS python3 .\simple_ode.py ...
  • 1
0 votes
0 answers
14 views

Reporting and/or evaluation of metrics in deep learning

While I was trying to write a custom training script, I encountered the following doubt. I see that the loss is evaluated at the end of every forward pass (i.e., a step or with a particular batch of ...
0 votes
1 answer
15 views

Force network to weigh specific variables during learning

I have a pandas data frame containing around 100000 observations of plant species and their age with additional numerical predictors (climate). I used tensorflow ...
0 votes
0 answers
30 views

Tensorflow regression model appears to not learn anything

I have a data set containing press releases from publicly traded companies in one column. Then I have the net return impact on the of the company who published the press release stock price. For ...
1 vote
1 answer
29 views

What values are actually used for the kernel when using a Conv2D layer?

I'm currently trying to fully understand what a Conv2D layer actually does and I think I got most of it. But theres one thing I don't quite get. When reading about Kernels there were multiple mentions ...
0 votes
1 answer
17 views

Why don't we increase the parameter from 64 to 128 in this CNN model?

I'm looking at an example lab from a coursera course titled Intro to Tensorflow. In this CNN model, they're gradually increasing the no. of filters from 16 to 32 and then 64. Why don't we increase it ...
0 votes
0 answers
16 views

Unsupported object type int Error where array is already in float32

I am learning DL. For the following dataset:: spam.csv can be found here::Click here to see. I am trying to implement a simple NN to detect spam email. For the following code:: ...
0 votes
0 answers
17 views

Randomize batches selection on replay_buffer in cartpole game - Tensorflow and RF-agents

I am trying the performances got with different hyperparameters on solving the cartpole Gym environment through TF-Agents using the starting code proposed around the Internet. I copy here the central ...
1 vote
2 answers
58 views

Which desktop hardware is best for DL?

I will be building my home Deep Learning workstation. Right now, I'm digging for some time about the best HW to use for home conditions. The workstation will be used for my work as a developer, but I ...
0 votes
1 answer
175 views

Tensorflow 2.11 error: AttributeError: module 'tensorflow._api.v2.compat.v2.__internal__' has no attribute 'register_load_context_function'

I had to update Tensorflow to the currently latest version 2.11. when importing i get "AttributeError: module 'tensorflow._api.v2.compat.v2.internal' has no attribute '...
0 votes
0 answers
28 views

Tensorflow : Trainable variable not getting learnt

I am trying to implement a custom modified ReLU in Tensorflow 1, in which I use two learnable parameters. But the parameters are not getting learnt even after running 1000 training steps, as suggested ...
  • 131
0 votes
0 answers
10 views

How to load time series data set, from .csv into keras 3D tensor

I would like to load, from CSV, where data are listed row by row, to load into Keras 3D tensor for LTMS. I've got error, that it requires 3D data, but I've only got 2D from CSV. Thank you in advance.
0 votes
0 answers
13 views

Explain the outputs of Bidirectional LSTM . There are 5 output , which of them are hidden state and cell state respectively?

I am trying to use bidirectional LSTM as encoder in my translation model. I set return_sequence=True and return_state=True and I ...
0 votes
0 answers
16 views

How does tensorflow keras lambda layer pass gradients?

Tensorflow / Keras has a Lambda layer which aids in working with arbitrary expressions as a Layer object. In my understanding a layer should be differentiable so that gradients can propagate through ...
  • 281
0 votes
1 answer
101 views

How can I convert a numpy array of tensors to tensor of tensors?

It is my first GRU model so pardon the stupidity. I am trying to learn by training a simple GRU network on variable length sequences. The sequences are numpy arrays of tensors. The length of numpy ...
0 votes
0 answers
9 views

How to sequentially combine two tensorflow models having same input features, connected through a function

This is a little more complex and tricking question than the simpler case of combing the output and input of two TensorFlow models. In this case, both the models accept the same N features from the ...
0 votes
0 answers
4 views

ExponentialSmoothing holtwinters with Keras Interace

Is it possible to wrap the statsmodels holtwinters with the Subclassing API in keras? The reason i want to do it, is i have a WindowGeneratorthat creates me batches ...
0 votes
0 answers
51 views

The val_loss is nan, but loss is printing. Both train and validation losses are nan in model.evaluate(), and the acc improves during training

There is a 2-class classification problem, and my loss function is custom. The labels are categorical, and the final activation function is Softmax. During the training, the loss is printed, but the ...
1 vote
1 answer
24 views

probability distribution

Just wanted to know if the value we get by passing, say, random.normal(shape=(3,2)) in the Tensorflow, etc, are normally distributed or if they are randomly chosen ...
0 votes
0 answers
10 views

Ground truth as a function of weights in Keras

I have a convolutional neural network that takes an image an outputs a value between -1 and 1. If the image is an array $I$, and the network transforms the array such that $\text{output} = f(I) \in [-...
0 votes
0 answers
10 views

Can not validate LSTM/GRU if return_sequences=True

As I understand the last LSTM before output layer should be set to model.add(LSTM(lstmUnits, return_sequences=False)) but in such a case I can not validate while ...
  • 101
0 votes
1 answer
30 views

How to build an image generation model for interior room design?

I want to build an image generator model of interior room design. This model should be able to generate an interior image of a living room/bedroom/hall/kitchen/bathroom. I have searched about it and ...
0 votes
0 answers
13 views

Tensorflow prediction of (PRNG) future values

I would appreciate if you could help me with the following problem: Future values of a given time series of pseudo-random values should be predicted. It is unclear how good the PRNG performs and if it ...
0 votes
0 answers
20 views

Scaling/Normalization again

I would like to ask for normalization .. again. I'm working on LSTM model having a 100x4 dataset used for timeseries prediction. My question is on which set of data the scalar/normalizer should be run ...
  • 101
0 votes
0 answers
53 views

Custom loss function in keras with class weights for each batch

I am new to deep learning and tensorflow. I am working on a speech binary classification problem, trying to replicate a research paper. Number of samples in class 1 are 2700 approx and in class 2 are ...
  • 1
0 votes
0 answers
8 views

Is the same dataset used to train the individual models (model1 and model2) and the ensemble model(stacking)?

I've trained two individual models. I stacked them and built an ensemble model. Code snippet: ...
0 votes
0 answers
139 views

EagerTensor object has no attribute 'astype'

I am using trained tf model output (TF 2.8) and trying to convert it to numpy array. ...
0 votes
0 answers
6 views

tensorflow dataset 'plant_leaves' cannot be imported to google Colab : DownloadRetryLimitReachedError

I'm trying to upload a tensorflow dataset called plant_leaves but it won't work and it shows a runtime error :
0 votes
0 answers
5 views

Can't concatinate texture_features and resnet50_features

I have extracted resnet features(array) and texture features(list) of my image dataset. My idea is to concatinating both of the features and then use the merged feature to fit the model. Code snippet: ...
0 votes
1 answer
22 views

Tensorflow / Keras - Using both ModelCheckpoint: save_best_only and EarlyStopping: restore_best_weights

ModelCheckpoint save_best_only: if save_best_only=True, it only saves when the model is considered the "best" and the latest best model according to the quantity monitored will not be ...
  • 21
1 vote
0 answers
14 views

Reproducibility issue between GPU graphic cards for DNN Tensorflow models

I am facing reproducibility issues on my DNN (Tensorflow, Keras) models when using different GPU cards. For example, when I use two a100 cards, I would be able to reproduce my results. If I use one ...
0 votes
0 answers
133 views

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

I am trying to train a neural network to recognize the number of pixels that are turned on in a 3x3 matrix. The "image" is very simple. Each pixel is either on or off. So it doesn't have ...
1 vote
2 answers
38 views

Will ML frameworks work with integrated graphics card in laptop?

I'm CS student. I'm just getting started in data science and machine learning. Can i use laptops with integrated graphics card in the data science and machine learning projects? Will pytorch and ...
  • 11
0 votes
0 answers
12 views

how can i get precision and recall on ANN

I received this error, how can I resolve it? ...
  • 1
0 votes
1 answer
42 views

TensorFlow random forest get label as prediction output

I'm using TensorFlow decision forest to predict the suitable crop based on few parameters. How do i get the predict() method to return the label ? Im using this dataset for training My code ...
0 votes
0 answers
17 views

Grad cam outputs for all the images are the same

I am using grad cam to see which regions of the test images are most important for the prediction of resnet50. The output I got has some errors. Code Snippets: <...
0 votes
1 answer
32 views

Append prediction of tensorflow to a pandas dataframe

I built a tensorflow model to make text classification in four category, after testing and evaluating it, I need to apply it to actual data to predict the class of them, I create a predict function ...
0 votes
0 answers
22 views

Incompatible shape in SimpleRNN layer

I'm reading the "Hands-on Machine Learning with Scikit-Learn, Keras and TensorFlow" book and got to the exercise telling the readers to create a model able to predict bach chorale notes. For ...
  • 113
0 votes
0 answers
20 views

Can early stopping be used with stratified k-fold validation to help avoid overfitting in neural networks?

I am using stratified cross validation and using transfer learning for the classification. I have 4 classes. I am training my model with fold=10 and epoch=20. code snippets: ...
0 votes
0 answers
12 views

Deep learning model for different shaped training and test inputs

Let me explain my problem first. Suppose I have a train dataset where input data dimension is (100,). I train this dataset with a deep learning model. Now when I test I do not have 100 inputs. I only ...
0 votes
0 answers
9 views

TF, Tf2 Tflite Conversion

I have created on TF2 and would like to convert it to tflite format to use on android devices. The conversion was done with tf2tflite convertor script on python: ...
  • 1
1 vote
1 answer
14 views

I have 2 Columns of text, Should I use different vectorizer and Embeddings for each or just one?

I have a dataset with two input columns as text. Should I use same textvectorizer in both columns or different ones? I am asking this because. columns a has average ...
0 votes
0 answers
15 views

Reinforcement learning discrete action

Assuming a relation such that $y = f(x)$, where $y$ represents a scalar and $x \in 20 \times 1$ vector consisting of zeros and ones, I want to set up a reinforcement learning model that changes the ...
0 votes
0 answers
15 views

Batch inference and seq2seq

I am following this guide to the Seq2Seq architecture. It is clear that the author suggests batch training during the teacher forcing step. However, during the inference step, the author restricts the ...
  • 123

1
2 3 4 5
44