Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
2 votes
0 answers
41 views

Image-to-Image with U-Net no Skip-connections. Is it real?

In general, U-Net is needed to create another style image, but preserve the structure. For example, a full-fledged drawing from a sketch. Right? I want to preserve the style, but change the structure. ...
Pavel No's user avatar
0 votes
1 answer
23 views

Why does tanh activation work better with Pytorch than with Keras?

I'm doing a neural network to recognize written Cyrillic letters, and I found out that, when I use tanh activation function, it works WAY better with PyTorch than with Keras. Keras code: ...
Poyo's user avatar
  • 1
1 vote
1 answer
112 views

Where has RSquare from tensorflow_addons.metrics gone and what's the appropriate replacement in model.compile(…) of keras?

tensorflow_addons is dead: ...
AlMa1r's user avatar
  • 121
1 vote
0 answers
47 views

Why can't I replicate the results from this paper?

I'm trying to train a model to evaluate chess positions, following the methodology from this paper (note that the author presents several different architectures, but I'm only looking at the ANN with ...
William Markley's user avatar
0 votes
1 answer
136 views

Is it possible to train a neural network to feed into a Random Forest Classifier or any other type of classifier like XGBoost or Decision Tree?

I want to create a model architecture to predict future stock price movement as such: The Goal of this model is to predict if the price will go UP or DOWN within the next 3 months. I have tried a few ...
Evank's user avatar
  • 1
0 votes
0 answers
10 views

Overfitting - Imbalance Classification using Deep-feed forward network

I have an unbalanced dataset, so I used SMOTEENN on the training set to resample, after training DFF,i could see the model is overfitting, could someone help me solve this? Thank You. ...
Pavithra K's user avatar
0 votes
0 answers
59 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 ...
D .Stark's user avatar
1 vote
1 answer
62 views

Does using different optimizer change the loss landscape

I plot the landscape using this code, and I notice the landscape shape has changed a lot. My understanding is that the optimizer does not change the loss landscape. But now I'm confused if its just ...
user836026's user avatar
0 votes
1 answer
60 views

How do I ensure final output shape matches input shape for a semantic segmentation task?

I trying to replicate the semantic segmentation example https://keras.io/examples/vision/oxford_pets_image_segmentation/ but train on my own data. I have 8 labels (7 features + background). My images ...
utx7563yu's user avatar
0 votes
0 answers
10 views

Using a neural network to predict disease outcomes in individual cases

I'm working on a research project with the goal of using a neural network to predict disease outcomes for patients. I've built a neural network using Tensorflow and Keras and I've trained and tested ...
Daniel Tveten's user avatar
0 votes
1 answer
84 views

Connecting Flatten layer to Dense layer

I'm struggling with my neural network. In short, I need to recreate a model from anywhere on the internet, I've found a model that combines BiLSTM, LSTM and GRU. However, based on the error I got when ...
Tatiana Budanova's user avatar
0 votes
1 answer
47 views

My custom neural network is converging but keras model not

in most cases it is probably the other way round but... I have implemented a basic MLP neural network structure with backpropagation. My data is just a shifted quadratic function with 100 samples. I ...
tymsoncyferki's user avatar
0 votes
1 answer
37 views

What exactly is saved when I save a NN?

After we trained a Neural Network, we can save it in order to be able to predict without re-training. So when we use model.save('my_model.keras') what exactly is ...
Cohensius's user avatar
  • 163
0 votes
0 answers
22 views

Neural network does not overfit my data. (Primarily linear function)

I am using TensorFlow and Keras. My goal is to approximate a primarily linear function that is partially nonlinear, such that a linear regression yields a Mean Absolute Error (MAE) of 0.13. All ...
Maxim Maximov's user avatar
0 votes
0 answers
27 views

Keras DNN outputs the same value over and over

I'm creating an ensemble of NNs with the same architecture, but each NN only outputs one value when given X_test data. The data (continuous values transformed to be [-1,1]) yields results as expected ...
quasimodo's user avatar
1 vote
1 answer
58 views

How to balance labeled datas and then carry out execution with a certain ratio?

I'm building a binary classification model using a neural network, with python and the libraries tensorflow and keras. For that I have an unequal amount of labeled data: Around 2'000'000 labeled with <...
user155518's user avatar
0 votes
0 answers
22 views

Why isn't the validation data loss close to the test data loss?

First I set aside about 15% of my data as test data. Then, I used tensorflow.keras to create a relatively simple neural net model. Then I set the model.fit() parameter validation_split=0.2, so 20% of ...
Alex's user avatar
  • 1
2 votes
1 answer
133 views

Why the test accuracy showing some odd behaviour in comparison to train accuracy?

I am currently training an ANN using Sequential(a class from Keras API within tensorflow), and I am optimizing the model's architecture and came across something I have not seen before. The graph of ...
Aach_copro's user avatar
1 vote
1 answer
220 views

activation=tf.keras.activations.relu vs activation='relu'

Both models are for binary classification problems Model 1 ...
Justin Jonany's user avatar
0 votes
1 answer
101 views

Confusion with tensorflow's Sequential Dense Layers

I'm working on a regression probem using Tensorflow, and have created two models with slight differences in their first Dense layer. The Models ...
Justin Jonany's user avatar
0 votes
1 answer
115 views

Neural Network for binary classification not working

I have made a neural network that was working correctly as a multi-class classifier, but after changing the loss and the activation function, plus the output layer to just 1 neuron, it is not working ...
alex martinez's user avatar
0 votes
1 answer
148 views

Custom Loss Function in Tensorflow for UNet

I am working on a Segmentation task, where I planned to use U-Net for the input_image of shape (224,224,3), the output should be the mask image of shape ...
Vishak Raj's user avatar
1 vote
1 answer
44 views

Patterns binary classification - model doesn't overfit

I am working on a very basic binary classification problem. For each set of four float numbers $(x,y,z,w)$, I want to check if they fall or not into one category. I have written a model in Keras with ...
apt45's user avatar
  • 121
0 votes
1 answer
76 views

Very low Neural Network Accuracy for Titanic Survival Problem

I am new to neural networks and have done a few projects but have got very low accuracy for all of them. I have included the code for titanic NN code here. Am I missing something or what? Can you help ...
thenoobcoder's user avatar
1 vote
1 answer
73 views

How to align the description of a convolutional neural network in keras with wikipedia's conceptual model?

I was going through the introductory guide to convolutional neural networks in tensor flow here And I was trying to logically map some of the code I saw to my actual understanding of how convolutional ...
Sidharth Ghoshal's user avatar
1 vote
0 answers
55 views

Generator loss keeps increasing while discriminator keeps decreasing

I am trying to build a GAN to generate LEGO images however my generator is not working at all. I have tried changing the learning rates but it caused the loss to go even more higher, sometimes into ...
Abhinav Painuli's user avatar
0 votes
0 answers
97 views

I have a strange loss behavior in Tensorflow/Keras. It goes smooth towards better values, and then suddenly it increases rapidly before falling again

I have a model that trains on a dataset of 100000 data points. The model is a single dense layer with a single neuron. During training, I use a batch size of 1000 and train for 250 epochs. After ...
Runei's user avatar
  • 1
0 votes
1 answer
580 views

What preprocessing should I do to a multiclass segmentation mask?

I am working on a segmentation problem. My masks are tensors with a shape of (4767, 192, 192, 1) --> (num_img, height, width, number of channels). Each mask contains 13 different pixel values (0, 1,...
PicaR's user avatar
  • 324
1 vote
1 answer
61 views

What should I Improve from my Neural Network Model (Logistic Regression)

Initial Information I built a Neural Network Model (Logistic Regression) to classify Lung Cancer based on the patient's (user) symptoms My dataset is kind of small (only about 276 data) Here is the ...
Jonathan's user avatar
1 vote
1 answer
172 views

How to correct ValueError about incompatible dimensions of training data set in locallyconnected1D layer NN

I'm training this simple network with a few points, but it can't train. The model looks okay, but when training it raises a ValueError about the dimension of the training data sets. Could someone help?...
KaRJ XEN's user avatar
0 votes
1 answer
562 views

How to use Keras Sequential with LocallyConnected layers

enter image description here I am trying to use locally connected neural networks to estimate finite elements of a mathematical function, using the Keras Sequential model. When I use dense layers all ...
KingMe's user avatar
  • 1
0 votes
1 answer
443 views

Can I change the number of inputs to a keras model while preserving the trained existing weights

I have a simple Sequential keras model with 150 Inputs. Some of these are simply OneHotEncoded values. Now I would like to add more options to the OneHotEncoder. As an example: I previously had Blue, ...
FLOROID's user avatar
0 votes
1 answer
529 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 ...
Panda's user avatar
  • 21
0 votes
1 answer
99 views

A curve val_loss and loss in keras after training a model

Can anyone help me, is my model overfitting or underfitting? I want to make sure the model is well done before starting to deploy Also, I use categorical cross-entropy loss I have asked before, but I ...
Manar-01's user avatar
-1 votes
1 answer
103 views

Curve val_loss and loss in keras after training a model

I trained a Keras model to diagnose disorders and want to make sure it is good enough to start deploying. From the below graph, can anyone advise me as to whether my model is overfitting or ...
user144971's user avatar
0 votes
0 answers
3k views

ValueError: Input 0 of layer "model_12" is incompatible with the layer: expected shape=(None, 256, 256, 3), found shape=(256, 256, 3)

I am following this keras example with my own dataset, which has 3 classes. I load the images using ...
Javi's user avatar
  • 103
1 vote
1 answer
425 views

Regression to fill NA values

As a part of an exercise, I have the following dataset. Note that I have no idea where the values come from (are they based on something real or are they random numbers? Don't know...) ...
Davide_sd's user avatar
  • 111
1 vote
1 answer
1k views

How to compare $R^{2}$ of train and test data in a Deep Learning Neural Network Regression model?

I want to judge the goodness of my neural network regression model built using Keras Python Library. The problem is the following: from an input like (1000, 5000) so 1000 samples and each sample has ...
HelpNeederStudent's user avatar
0 votes
1 answer
1k views

Keras: LSTM model training - great differences in training results

This is an issue I've been encountering before and I was wondering what can be potential causes for this. Occasionally, training of an identical setup LSTM model ( using Keras ), on the same training ...
user2999349's user avatar
0 votes
1 answer
194 views

Difference between class_weight and loss_weights arguments in TensorFlow/Keras

I am creating a neural network using TensorFlow (v2.9.2) for an imbalanced image dataset. While doing so, I noticed that model.compile() method has an argument <...
Harsh Khare's user avatar
0 votes
0 answers
314 views

CNN-BERT Text Classification good results on train and val, but bad prediction on testing

I built a Keras model to predict hoax news and true news using the CNN-BERT Text Classification algorithm with Categorical Classification, with label 1 indicating a hoax and 0 indicating true news. ...
AccelUp's user avatar
1 vote
1 answer
265 views

No improvement in test and training accuracy when training different optimizers

I am currently testing 5 different optimizers to see their training loss, and their testing accuracy. The optimizers are: AdaGrad, AdaDelta, RMSprop, Adam, Nadam. I am using a quite simple model with ...
heradsinn's user avatar
1 vote
0 answers
273 views

Keras NLP TransformerDecoder MultiHeadAttention Value Error

Recently I have been working on a MIDI Music Generator using the TransformerEncoder & TransformerDecoder layers found in the Keras NLP library. There is not much info/help on these layers which is ...
Cameron A's user avatar
1 vote
0 answers
31 views

What is exactly the loss value evaluated at every epoch of training?

If I compile a certain model with adam optimizer and I have used a batch size of 32 in the fit function, When I start training the model, I get a loss value at the end of every epoch. I understand ...
AAA's user avatar
  • 35
0 votes
1 answer
35 views

Is this a case for too much dimensionality? 1881 samples, 2562 features

I have been working on creating a multi-class classification model for medical data. I have 1881 samples, 2562 features each, and 6 classes total. My distribution of classes is as follows: {1: 83, 2: ...
StrWrs_Nerd's user avatar
1 vote
1 answer
35 views

Modelling Player Impact on English Premier League

Let's say you have a very wide feature vector, all 0s and 1s, all 500 players in Premier League as features, out of which only 22 participate in a match. Those that participate are marked with 1s, ...
Alexandru Gris's user avatar
3 votes
1 answer
793 views

Should I use validation data and val_loss when training final model?

I am training a keras model that utilizes early_stopping in order to prevent overfitting. This requires that I set aside a validation dataset. My task requires that ...
ndake11's user avatar
  • 133
0 votes
1 answer
1k views

TypeError: object of type 'NoneType' has no len() when implementing neural network

I am building artificial neuron network (ANN) model for predicting values but facing problem: Input: ...
leskovecg98's user avatar
0 votes
1 answer
395 views

Sports prediction using Keras NN stuck at ~0.5 accuracy

I'm currently in the process of getting into data science, ML, and especially neural networks (coming from a "pure" software engineering background/degree). I did some models on classic ...
Maximilian Krause's user avatar
0 votes
2 answers
3k views

what does shuffle and seed parameter in Keras image_gen.flow_from_directory() signify?

...
Rezuana Haque's user avatar

1
2 3 4 5
13