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.
2,106 questions
2
votes
0
answers
32
views
Kaggle TPUv5e8 7 times slower than v3
I am trying to learn Kaggle TPU and I am migrating a Flower Classification notebook from an older TPU v3-8 environment to the new TPU v5e-8 (TPU VM) environment on Kaggle. I was trying to migrate this ...
3
votes
1
answer
67
views
What loss functions are suitable for a YOLO-like architecture in TensorFlow/Keras, especially for fine-tuning on an imbalanced dataset?
I'm working with a custom YOLO-like architecture implemented in TensorFlow/Keras. While pretraining on the COCO dataset works, I plan to fine-tune the model on a highly imbalanced dataset.
...
5
votes
1
answer
112
views
Variable Length Input: How to handle longer input sequences during model testing
As the part of my college project on RNN, I'm working on a text classification task using tensorflow module. During training, I used pad_sequences with a max_length of 100, so all training examples ...
2
votes
0
answers
62
views
DensNet169 model accuracy not increasing on medical classification dataset
I am training an DensNet model on medical dataset which has gold standards as per annotation. After training i noticed accuracy is just 60%. Later i performed following changes but still no luck. ...
1
vote
0
answers
40
views
GNN Loss NaN after first training example?
I am trying to train a GNN but am getting a NaN loss function immediately after the first training example. Below I have included all of the pertinent code. My input is 385 points in 3D space confined ...
0
votes
0
answers
34
views
Custom loss function not behaving as expected in PyTorch but does in TensorFlow
I tried modifying the reconstruction loss such that values that are pushed out of bounds do not contribute to the loss and it works as expected in tensorflow after training an autoencoder. However, ...
1
vote
0
answers
34
views
Getting ValueError: Unexpected object from deserialization, expected a layer or operation, got a <class '__main__.L1Dist'> while reloading the model
here is the code from the Distance layer part because site is not allowing me to upload full code.
embedding = make_embedding()
distance layer
...
1
vote
0
answers
39
views
Q-values output is NaN in DQN model - input state is normalized and padded
I'm training a Deep Q-Network (DQN) to trade crypto using historical data. My model keeps outputting NaN values for the Q-values during prediction. I'm using a custom function getState2() to generate ...
2
votes
0
answers
84
views
tuple has no attribute "rank" error when trying to build bayesian neural net
I'm trying to build a BNN but am encountering the error in the title. I tried to ensure I'm not passing a tuple to .shape.rank by :
using the functional API with explicit Input (should make first ...
2
votes
0
answers
72
views
ONNX - How do I convert ONNX float32 model to bfloat16?
I have found several documentation and tools for converting ONNX model to float16, but none of them supports converting to bfloat16.
The model is originally trained using tensorflow and converted to ...
2
votes
0
answers
38
views
Multinodal vs modular neural network
I’ve made a couple of neural networks that predict separate target features form the same dataset. All these networks have different hyperparameters and different function transforms for example (log) ...
4
votes
3
answers
240
views
Time series predictions with LSTM
I have collection of TEC data.My data sample for example the day1,day2,day3,day4.
Case1:
I have the following task to do: Training by the consecutive 3 days to predict the each 4th day. Each day data ...
0
votes
0
answers
35
views
Tensorflow tape.gradient to calculate a 2d array with respect to a single column of the 2d array input
I have a feature dataframe that has a shape of (100,18). 18 features for 100 different points. One of those features is time. The model will then output an array with shape of (100,16). The model has ...
2
votes
1
answer
56
views
Need to automate collecting relevant information from websites and creating valuable insights
I need to collect information from 5 websites say once a week and then keep only the relevant info in a formatted manner.
relevance here means relevant to my topics.
I intend to automate this -from ...
0
votes
0
answers
37
views
Tensorflow "your input ran out of data" warning despite using .repeat()
I am attempting to subsample a timeseries dataset to reduce training time. Because I am using a mapping / window generator I want to apply this subsampling / dropping after the data samples are ...
1
vote
2
answers
179
views
Please help with 1d Convolutional Neural Network with two channels in Tensorflow
I've been trying effortlessly (to no avail) for the past month to run a CNN. I previously tried PyTorch without success, and am trying Tensorflow as it appears simpler. I have simulated data from a ...
1
vote
2
answers
130
views
Embeddings for multiple categorical features with different cardinality
If I have multiple categorical features, each which has its own unique cardinality, and I want to use an embedding layer to reduce the dimensions fed to an MLP. Should I have one big embedding matrix ...
0
votes
0
answers
42
views
I need to train a multiclass model but i have a small dataset
I have an Excel file that contains two columns, one with text like phrases and other that tells me the classification that goes from 'CS1' to 'CS8'. The text is like
...
0
votes
0
answers
34
views
Am I following the correct approach?
I am working on a medical semantic segmentation problem, where the input is of size (1,256,256) and I have two outputs associated with that input ( two masks ) each with shape ( 1,256,256). For every ...
2
votes
2
answers
102
views
BERT + CNN Model Underfitting for Binary Text Classification: How to Improve?
I'm working on a binary text classification task using a BERT + CNN model. However, based on the loss and accuracy graphs during training, it seems that the model is underfitting, and I'm not seeing ...
0
votes
0
answers
31
views
Are group convolutions still used?
Group convolutions theoretically should reduce the number of parameters and hence improve the speed of inference, without significantly affecting the performance of the model. However, I don't notice ...
0
votes
0
answers
80
views
LSTM forecasting model highly dependent on random seed: how to tame this effect?
I have a time series forecasting binary classification model made up of several layers of LSTM or GRU cells. The training is early stopped in a given validation set.
The thing is my results vary ...
0
votes
0
answers
21
views
Why does my LSTM only print out one day?
I made an LSTM for predicting stocks and it only predicts 1 day but I want to predict a range.
...
3
votes
1
answer
544
views
Using keras metrics BinaryCrossentropy for a binary model
I'm trying to implement a binary classification model using tensorflow keras and stumbled over problem that I cannot grasp.
My model shall classify images of houses in the two classes of "old/...
2
votes
1
answer
118
views
How to get logits from trained tensorflow model (for softmax temperature scaling)
I have a trained TensorFlow classification model (52 classes).
I didn't built the model (I just load it with it's weights)
the 3 last layers are:
...
0
votes
1
answer
1k
views
model.summary() doesn't return proper output shape in keras sequential model
When model.summary() is called it returns all params as 0.
...
1
vote
1
answer
100
views
How to use differential entropy as pre-processing?
I am currently working on implementing the model EEG_DMNet. For pre-processing it calls for using differential entropy like
$$
h(X) = -\int_{-\infty}^{\infty} p(x) \log p(x) \, dx
$$
Assuming the Data ...
0
votes
0
answers
26
views
1
vote
1
answer
58
views
Enormous variability in time series forecasting model. How would you deal with it?
I am working on a difficult physical time series forecasting model with tensorflow.
The model is a binary classifier with around 100 features, which basically consists of 4 LSTM layers (input + 2 ...
4
votes
2
answers
94
views
Why are the accuracy and loss graphs of my Keras binary model not smooth?
I am creating a binary model and using TensorBoard to visualize the graph of the accuracy and loss. However, I noticed that the graphs for my model's accuracy and loss are not smooth. Why is that?
...
0
votes
1
answer
47
views
CNN model is not learning enough. Accuracy remains the same throughout
I am working on a Deep Learning model which will help me predict deep fake voices. For the data preprocessing, I have done everything to the T, following papers which have already been published. But ...
3
votes
1
answer
56
views
Multi Output Classification - Outputs not making sense relative to one another
Let's say I have a Multi Output Binary Classification Problem, but where the classes are related. i.e if one class = 1, then the other must = 1.
The standard is to have 2 output layers, each with 1 ...
1
vote
1
answer
83
views
TensorFlow and Quadratic Functions
I was trying to get Tensorflow to model/predict y=x^2. After reading around, I gathered that using the tanh activation helps capture non-linearities. However, all I am getting are straight-line ...
1
vote
1
answer
79
views
Where should I learn pytorch from?
I'm a undergraduate student. I've coded a three-node neural network (that works) based on my professor's guidance. However, I'd like to pursue a career in AI and Data Science, and I'd like to teach ...
1
vote
0
answers
38
views
python model to predict future performance
I would like to build a python model to predict how a student will perform on a given math test. I have data relating to each student and also their score on up to 100 previous tests that (each ...
1
vote
1
answer
79
views
wierd neural network approache
I'm working on a problem where I need to create a neural network to optimize the seating arrangement for 24 unique individuals in a 6x4 grid, minimizing conflicts between adjacent (up,down,left,right) ...
1
vote
1
answer
295
views
Validation accuracy can't increase above 70%
I am building a classifying model to predict images over 3 classes. The data is balanced, with 10.5k images for train ( 3.5k for each ), 3k validation images ( 1k each ).
I increased my ...
1
vote
0
answers
94
views
Validation accuracy stuck in tf keras
So I have a model to classify images into 3 classes. I have 10.5k train images ( 3.5 per each category ) and 3k ( 1k per each category ) validation images but I can't increase my val_acc no matter ...
1
vote
0
answers
31
views
How to include variable input shape in convLSTM2D?
I am classifying time series of 72x72 images in 4 filters (just like RGB). Things work well ...
0
votes
1
answer
309
views
How to view Ep Reward mean when using TensorBoard with stable Baselines 3
I am not seeing ep_rwd_mean when running tensorboard.
I can only see
...
0
votes
0
answers
56
views
Can't reduce val_loss when teaching computer vision
I tried everything, improved the architecture, added layers, neurons, but it doesn’t work. Could this be because I'm training images at 384x384 resolution?
...
-1
votes
1
answer
34
views
CS undergrad query about DS
why is learning DS so ambigious .you dont truly know what should you learn to actually do DS .web dev say has a clear path learn html css js and you can make something .i am a cs undergrad just want ...
0
votes
0
answers
50
views
Getting nearly 100% accuracy using Binary Classification in Tensorflow but incredibly wrong prediction levels for email messages
I'm creating a Chrome Extension to read user emails via Gmail's API, and then passing in user emails to a trained Keras model in Flask to determine whether the email was written by an AI or a Human, ...
0
votes
0
answers
87
views
Tensorflow SegNet architecture
I was unable to find a complete description of the SegNet architecture for image segmentation (specifically, the decoder layers). Therefore, I would like to clarify the correctness of my ...
0
votes
0
answers
96
views
(Tensorflow) How to speed up initialization of model.fit()?
So I'm working with a rather large dataset (perhaps not really by ML standards - but too big to fit into my computer's RAM at any rate). And so, I train the model by successively loading a subsample ...
1
vote
1
answer
350
views
How to Balance Dataset extracted using image_dataset_from_directory
I'm new to tensorflow, so I've been trying to find the best way to do class balancing over a dataset where I used image_dataset_from_directory to load. But I haven't find the way to do it. I saw from ...
0
votes
0
answers
177
views
Can someone interpret my Binary Cross Entropy Loss Curve?
I am trying to understand my loss curve using : tf.keras.losses.BinaryCrossentropy()
Question 1: Based on my loss curve/accuracy, would it be wise to proceed to feed it into a ensemble learning model ...
1
vote
0
answers
31
views
How can I change my input shape in the architecture for the cnn(transfer learning)?
I have already made a model and trained it, and then saved the model along with its weights. The input shape in that model is [900,300,1] which is [height,width,channel].
I want to use the same model ...
1
vote
1
answer
73
views
How do I automate testing and comparison of the performance of models with different layer depths, layer types, and unit counts?
I am testing the effects of different layer counts/depths, unit counts, and layer types for natural language processing. I made a Kaggle notebook where I manually create different layers and then ...
1
vote
1
answer
107
views
Aside from trial and error, how do I select the number of layers and unit counts for LSTMS, GRUs, and Transformer units for text and time series?
When deciding on the number of units and layers for text processing or time-series prediction I rely heavily on trial and error. First, I look for a reference or paper on the topic such as the white ...