Skip to main content
7 votes

Face tracking with recognition and age/gender detection

I am not much familiar with CV in general so my comments will not address all of your concerns. Nonetheless: Control blocks and nesting What makes the code a bit hard to follow is the control blocks, ...
Kate's user avatar
  • 8,778
5 votes

Machine Learning Model to Predict the Type of Variable Star from Light Curve

You're asking for two very separate critiques, of ML approach and of implemented code. That P-R curve looks just dreadful. It's saying that for super obvious cases you nail it, and then after that you'...
J_H's user avatar
  • 43.3k
5 votes

Face tracking with recognition and age/gender detection

Write helper functions Quite an interesting project, the main problem of your code is a monolithic main function without helper functions. For example this: ...
Caridorc's user avatar
  • 28.2k
5 votes
Accepted

U-Net: A TensorFlow model

This is clean code for a hobbyist. ML code in particular can end up being a procedural mess, just carrying out one imported function after another, but this is quite good. It's great that you have ...
QuantumChris's user avatar
  • 1,405
2 votes

Creating generator object with image augmentation to train Convolutional Neural Networks with Keras

Class syntax The parens are not necessary here: class Generator(): Type hints Type hints will add more built-in documentation to your code, and will help the ...
Reinderien's user avatar
  • 71.2k
2 votes

Convert an English sentence to German using Bahdanau Attention

Had a quick look and I can see there are some foundamental issues of the model implementation besides the problems mentioned in other answer(s) and comment(s). The German sentences should not be the ...
GZ0's user avatar
  • 2,361
2 votes

Convert an English sentence to German using Bahdanau Attention

File operations This: def load_data(filename): file = open(filename, 'r') text = file.read() file.close() return text is such a common and simple ...
Reinderien's user avatar
  • 71.2k
2 votes

MNIST Deep Neural Network in TensorFlow

Whereas unlikely to have high impact, I have found a potential source of overfitting in your code: ...
Nikolas Rieble's user avatar
2 votes

Time series prediction by LSTM model

Here are some general coding style suggestions. Documentation You should add a docstring to the top of the code to: Summarize what the code does Describe the types of input files (CSV, etc.) Describe ...
toolic's user avatar
  • 16.4k
2 votes

Filipino Sign Language Recognition System Using MediaPipe & TensorFlow

Your feature extraction lacks additional distinguishing features, such as finger angles, palm orientation, and motion dynamics (velocity/acceleration of key points over time). Try incorporating these ...
LELOUCH0011's user avatar
2 votes

Filipino Sign Language Recognition System Using MediaPipe & TensorFlow

I only have a few minor style suggestions which are unlikely to address your optimization goal. Documentation The PEP 8 style guide recommends adding docstrings for functions. It would be good to ...
toolic's user avatar
  • 16.4k
2 votes

Custom neural network implementation in TensorFlow to compare normalisation vs. no normalisation on data

DRY You have a group of lines of code that is mostly repeated. Place as much of it into a function as possible, something like: ...
toolic's user avatar
  • 16.4k
1 vote

Keras Tuner Subclass for Time Series Cross-Validation

redundant object attribute ...
J_H's user avatar
  • 43.3k
1 vote

Industrial Practices for Time-Series Forecasting

Portability This line is not standard Python code and causes a syntax error when trying to run the code: ...
toolic's user avatar
  • 16.4k
1 vote

Constraining monotonicity in the loss function during training

There are multiple approaches you can try: Gradient projection Let's say the total loss to minimize is lossTotal = loss1 + loss2. When computing the gradients of <...
mle's user avatar
  • 171
1 vote

Keras stacked LSTM model for multiclass classification

If I understand your problem, your samples are 150-dimensional vectors which is to be classified into one of four categories. If so, an LSTM architecture is a very poor fit because there are no ...
Gaslight Deceive Subvert's user avatar
1 vote

BipedalWalker-v2 one-step actor-critic agent trains slow

By adding the line: sess.graph.finalize() I was able to track down the source of the problem. The code was slow because the Tensorflow graph was getting bigger ...
Diego Orellana's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible