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, ...
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'...
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:
...
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 ...
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 ...
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 ...
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 ...
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:
...
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 ...
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 ...
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 ...
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:
...
1
vote
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:
...
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 <...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
tensorflow × 47python × 46
machine-learning × 29
python-3.x × 11
neural-network × 9
performance × 7
opencv × 5
numpy × 4
image × 4
keras × 4
ai × 3
beginner × 2
algorithm × 2
pandas × 2
lstm × 2
multithreading × 1
file-system × 1
matrix × 1
csv × 1
statistics × 1
library × 1
stream × 1
compression × 1
matplotlib × 1
dice × 1