text:
5 years later, are maxout networks dead, and why?
Maxout networks were a simple yet brilliant idea of Goodfellow et al. from 2013 to max feature maps to get a universal approximator of convex activations. The design was tailored for use in conjunction with dropout (then recently introduced) and resulted of course in state-of-the-art results on benchmarks like CIFAR-10 and SVHN.
Five years later, dropout is definitely still in the game, but what about maxout? The paper is still widely cited in recent papers according to Google Scholar, but it seems barely any are actually using the technique.
So is maxout a thing of the past, and if so, why — what made it a top performer in 2013 but not in 2018?

Basically, if you read the full paper (especially, the abstract and the section 7), you find that the main accomplishment remains a marginal contribution on top of dropout.
If you see the empirical results on Table 5 (of the page 5) of the maxout's original paper, you find that the misclassification rate is only very, very slightly lower than that of dropouts. (2.47 % instead of 2.78%)
That could explain the relatively lower interest in the work.

Thanks for your answer. Cutting the error from 2.78% down to 2.47% is actually a 11% decrease in the error rate. Not a game changer but still interesting and definitely not tiny.

Fair point.  If that is of interest to your specific application, it certainly is worth investigating.

A few years later, stumbling on my own question, I feel I could share my view on that point.
I think it boils down eventually to a question of efficiency. There is nothing wrong per se with maxout; it is a distant cousin of ReLU that is in theory more capable. But the crux of the matter is that to produce a single scalar output, maxout consumes $k$ neurons, $k\geq 2$. The minimum price to pay to replace a standard activation function like ReLU with maxout while keeping the latent dimension is doubling the width of the scalar product. It is rather steep.
Though, a nice property of maxout is that it tends to keep the signal very much alive, instead of killing it like ReLU does. That property might prove to be important enough for maxout to flourish in some niche market despite its inherent wastefulness.


text:
Does it make sense to add word embeddings as additional features for LSTM model?
I have an LSTM model. This model takes as input tokens. Those tokens represent XML markups extracted from some XML files. My model is working fine. However, I want to optimize it by adding word embedding as additional features to the LSTM model. Does it make sense to combine word embeddings and encoded tokens (encoded as integers) for the LSTM model ?

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Why not teach to a NN not only what is true, but also what is not true?
I'm not a person who studies neural networks, or does anything that is related with that area, but I have seen a couple of seminars, videos (such as 3Blue1Brown's Series), and what I am always told is that we trying the network over some huge collection of data about what is right. For example, when we are training an AI in order for it to recognise hand written words, what we do is that we give it some hand-written letters, and let it guess the letter. If the guess is wrong, by some means, we adjust the neural network in a way that, next time it will give us the correct result with more probability (the basic description of the "learning" process might not be accurate, but it is not important for sake of the question.)
But it is like teaching some mathematical subject to a student without saying him/her the boundaries of the theorems that we supply; for example, if we teach A implies B, student might be tend to relate A with B, and when he/she has B, s/he might be tempted to say we also have A, so to make sure he/she will not do such a mistake, what we do is to show him/her  a counterexample where we have B, but not A.
This - i.e teaching not only what is true, but also what is not true - especially important in the process of "learning" of a neural network, because the whole process is in a sense "unbounded" (please excuse my vagueness in here).
So, what I would do if I was working on neural networks is that; for example in the above recognition of hand written letter case: I would also show the NN some non-letter images, and also put an option in the last layer as "non-letter" with all those other letters, so that the NN should not always return a letter just to sake of producing a result for a given input, it needs to also have to option to say that "I do not know", in which case it produces the result Not a Letter.
 Question
Is there anyone that has ever applied above method to a NN, and got results ? if so, what were the result compare to the case where there is not option as "I do not know".

Yes this is done routinely. For example this is how the YOLO object detection and classifier system works, to give a real-world for example. In YOLO, the "non-object" classification is "background" i.e. any image segment that doesn't contain one of the types of object we are interested in.
In general, you can add an "other" class to any classifier, provided you have data examples that fit into "other" class to learn and some sense of how often "other" will occur in the production system you are aiming for. Whether you choose to do so depends on the purpose of the model.
Many toy and test models do not include an "other" category, because they are used in a closed way to assess how each machine learning system works. That includes the famous MNIST handwritten digits data set for instance, so if you read tutorials about that, there is an underlying assumption that the trained network will only be presented with other handwritten digits and its only task is to classify them. However, this is not a general assumption for machine learning classifiers in general, just related to the goal of using the MNIST data set.
Adding a new "I do not know" category does not increase the accuracy or performance of a system when that category is not important in the target production system. When such a category is required due to the nature of a task, then the performance metrics will be different - a system that has been trained with some negative examples will likely perform better in that case.

@DuttaA: there is typically only one "I don't know" class that contains everything not already classified. It is more interesting problem to decide how many "I don't know" data examples to provide, and how varied they should be. The pragmatic answer there is whatever leads to the best performance in production, which hopefully goes through a test and QA phase using realistic data.

@DuttA: Humans who have seen only dogs and cats before, who then see a wolf, will almost definitely think that the wolf is a dog, too. You circumvent this problem by providing examples of the "other" class (in this case pictures of a wolf) correctly labeled (as "other"). There are perhaps more interesting scenarios where classes are created in response to important details - in the dog/wolf scenario for a human after they learn some more things that make the animal different - it's wild habitat and different behaviour. There might be some research about that, but it seems a different question.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Is 'job title classification' rather a problem of NLP or machine learning?
first of all I want to specify the data available and what needs to be achieved: I have a huge amount of vacancies (in the millions). The information about the job title and the job description of each vacancy are stored separately. I also have a list of professions (around 3000), to which the vacancies shall be mapped.
Example: java-developer, java web engineer and java software developer shall all be mapped to the profession java engineer.
Now about my current researches and problems: Since a lot of potential training data is present, I thought a machine learning approach could be useful. I have been reading about different algorithms and wanted to give neural networks a shot.
Very fast I faced the problem, that I couldn't find a satisfying way to transform text of variable length to numerical vectors of constant size (needed by neural networks). As discussed here, this seems to be a non trivial problem.
I dug deeper and came across Bag of Words (BOW) and Text Frequency - Inverse Document Frequency (TFIDF), which seemed suitable at first glance. But here I faced other problems: If I feed all the job titles to TFIDF, the resulting word-weight-vectors will probably be very large (in the tenth of thousands). The search term on the other hand will mostly consist of between 1 and 5 words (we currently match the job title only). Hence, the neural network must be able to reliably map an ultra sparse input vector to one of a few thousand basic jobs. This sounds very difficult for me and I doubt a good classification quality.
Another problem with BOW and TFIDF is, that they cannot handle typos and new words (I guess). They cannot be found in TFIDF's word list, which results in a vector filled with zeros. To sum it up: I was first excited to use TFIDF, but now think it doesn't work well for what I want to do.
Thinking more about it, I now have doubt if neural networks or other machine learning approaches are even good solutions for this task at all. Maybe there are much better algorithms in the field of natural language processing.
This moment (before digging into NLP) I decided to first gather the opinions of some more experienced AI users, so I don't miss the best solution.
So what would be a useful approach to this in your opinion (best would be an approach that is capable of handling synonyms and typos)? Thanks in advance!
p. s.: I am currently thinking about feeding the whole job description into the TFIDF and also do matches for new incoming vacancies with the whole document (instead of job title only). This will expand the size of the word-weight-vector, but it will be less sparse. Does this seem logical to you?

This question has a number of parts to it.
First, you have a representation problem: what is the correct way to present textual data to your machine learning algorithm?
In this case, you chose to apply Bag-of-Words and then TFIDF scores. For English, this might be expected to produce on the order of 100,000 features, with each instance having only a few non-zero features.
If you want to go this route, you would typically also do some kind of feature selection to eliminate unimportant features from consideration. Depending on your task, you may be able to reduce the size of your input vectors quite dramatically while still getting good performance (for some tasks, to just 100 or so).
You're right that this might not be the most promising approach however.
My choice for this problem would be to use a compression classifier, like DMC. These have the advantage that they do not need any feature selection or pre-processing, and can easily handle new words or typos. They give state-of-the-art performance on tasks like spam-email classification.

Thanks for your advice so far. For your or anyones interest: Doing a test with around 60 000 samples I first got a feature size of around 31 000 from TfIdf (titles only). After applying some normalization to the inputs (e. g. lowercase transformation, removing stopwords, compound splitting) I was able to reduce the features to 13 000. I will have a look at DMC and its possible applications soon.

This is a huge growth area in the impact of AI on HR -- see all the companies we've found that do candidate matching for instance (disclaimer I work for CognitionX). Under the hood, there are techniques that don't rely on vocabulary such as Facebook's FastText but need more training data.
Here are some other resources
Job matching using unsupervised learning (k-nearest neighbour)
 see paper

I've been tackling a similar job title classification problem and used this paper as the basis for my approach: https://web.stanford.edu/~gavish/documents/phrase_based.pdf
Might find it useful.

Its definitely simpler task as NLP or mashine learning, its keyword based. And you have a little bit wrong view on that. See your example:
Example: java-developer, java web engineer and java software developer shall all be mapped to the profession java engineer.
Not at all : java web and java are different jobs, while java software developer = java-developer and word software means nothing, cause java already stand for software. The info can NOT be mined from texts like job applications -> you have no link to a sence what title is , and better just create the mapping by hand - its not so long. Then, just look in text for key words and ignore other words

Its definitely simpler task as NLP or mashine learning, its keyword based. Isn't a keyword based approach just a subpart of NLP? I mean, you will do something like word tokenizing, NER, maybe even POS analysis to improve performance. What's the difference to you?


text:
What methods are there to detect discrimination in trained models?
I've been researching AI regulation and compliance (see my related question on law.stackexchange), and one of the big take-aways that I had is that the regulations that apply to a human will apply to an AI agent in most if not all cases.  This has some interesting implications when you take a look at concepts like bias and discrimination.
In the case of a model with explicit rules like a decision tree or even a random forest, I can see how inspecting the rules themselves should reveal discrimination.  What I'm struggling with is how do you detect bias in models like neural networks, where you provide the general structure of the model and a set of training data, and then the model self-optimizes to provide the best possible results based on the training data.  In this case, the model could find biases in past human decisions that it was trained based on and replicate them, or it could find a correlation that isn't apparent to a human and inform decisions based on this correlation that may result in discrimination based on a wide array of factors.
With that in mind, my questions are:

What tools or methodologies are available for assessing the presence and source of bias in machine learning models?
Once discrimination has been identified, are there any techniques to eliminate bias from the model?

authors: ℳ                            .


text:
Can the opponent's turn affect the reward for a DQN agent action?
I made an engine for a 2 players card game and now I am trying to make an environment similar to OpenAI Gym envs, to ease out the training.
I fail to understand this thing however:

If I use step(agentAction), I play the agent's turn in the game,
calculate the reward.
Play the opponent's turn (which will be either a random AI or a rule-based one).

Question:
Does the opponent's turn affect the calculated rewards? As far as I know, the reward should only be the result of the agent's action right?
Thank you.

Does the opponent's turn affect the calculated rewards?

Yes, in general it can. Obvious case, in a two player game where the opponent could win or lose on their turn, but has other options.

As far as I know, the reward should only be the result of the agent's action right?

In a well-defined MDP, the reward should be a stochastic function of the current state and the agent's action. The stochastic part can include any changes due to an opponent player.
If the opponent player is random, or follows a well-defined and fixed policy, then you consider them part of the environment. So this requirement is met technically. The reward does only depend on current state and the agent's action. The actual result may happen on the opponent's turn, but that does not matter.
In a card game where the opponent's cards are hidden and affect their strategy, this may not strictly be the case, because the visible state will not determine the opponent's behaviour. The problem stops being an MDP, and starts being a POMDP. Whether or not that impacts the agent will depend on how much strategy relies on the hidden nature of these cards. In blackjack, there is little impact to not knowing an opponent's cards before they are played out - there is little difference between hidden cards and cards that are randomly determined after the agent plays. So you can get away with pretending it is a normal MDP. In poker, the knowledge of hidden cards is almost everything about the game, so a POMDP or other approach that tracks possible hidden state is required.
Note that learning to defeat a random or expert player is usually not the same as learning to play optimally (unless your expert player is already optimal). For that you may need self-play and an agent which learns both players' policies.

So if for example the agent's action results in him capturing 0 cards on the table but when the opponent plays, he captures 2. Does this mean the agent failed? Would the reward be -2?

Another scenario would be the end of the game, where my agent captures 0 cards and the cards left (e.g. 3) on the table go to his opponent (assuming he's the last capturing player), I believe in this case the reward would be -3 to teach the agent that he needs to capture last in the last round?

@Haytam: If the goal is definitely to capture cards, and not let the opponent do so (i.e. that is all that matters in the game), then you can have rewards that count cards. Otherwise, just +1 for a win, 0 for a draw and -1 for losing at the end of the game should be fine, and is a standard approach for RL playing classic 2-player games.

The goal is to capture cards, but efficiently. If the agent has the choice to capture 1 card or 3 sequential cards, I want him to choose the 3 sequential cards, that's why I want my reward to be the number of cards eaten, but I want to be sure about the opponent's turn, because I don't think the opponent's turn has anything to do with my agent's action right?

@Haytam: The opponent's turn is definitely important to the agent, and you should find a way to include its effects. I don't know the card game you are modelling, so it might be reasonable to ignore how many cards the opponent captures. However, my gut instinct says that is not the case. You mention "sequential cards" as a desirable outcome - this implies there is more to this game than just total number of captures (that's how I understand the term "sequential", unless you just mean "total"). So using captures as a reward signal would be inaccurate. Winning at the end always matters though.

If you're interesting about the game: https://www.pagat.com/fishing/ronda.html
What I mean by sequential is that if on the table there are cards 1, 2, 3, 4 and the agent has the cards 1 and 3, I want him to capture with the card 1 so that he gets 1>2>3>4 rather than capturing with 3 which will only get him 3>4

I apologize for the long texts, is there any way I can contact you outside of here? If you have the time of course.

@Haytam: If you have further questions, I would prefer you ask new ones on the site. However, just from your brief description, I am even more certain that you want end-result win/draw/lose for reward. Any rewards that count captures seem to me to be more like heuristics, and not really suitable for a reward signal.


text:
Using CNN LSTMs for prediction of images from image series
I have the following setup for a prediction task: I want to predict entire pictures from previously given pictures. In my case, only 2 pixels in every frame are neither black nor white, they are some moving objects whose movement I want to predict. The 2 pixels are the centers of some square regions of, say, 10m length/ width. One might be green and the other one might be blue. There are socalled no-go-areas where none of both objects can go, and they are depicted by black pixels, whereas every pixel apart from the 2 coloured and the black pixels are areas where the objects can possibly move to and they are depicted by white pixels.
Now my questions: Is it possible to use this as a prediction setup, i.e. use LSTMs and/ or CNNs to predict the future "image"? The image would stay largely the same, because the two coloured pixels would be the only ones moving, the black or white ones remain in the same spot. Can a CNN/ LSTM combination learn that the white areas are accessible whereas the black ones are not, given enough sequences of images, and can it learn the rules by which the coloured pixels move?


text:
In CNN (Convolutional Neural Network), does the combination of previous layer's filters make next layer's filters?
I know that the first layer uses a low-level filter to see the edge information. As the layer gets deeper, it will represent high-level (abstract) information. Is it because the combinations of filters used in the previous layer are used as filters in the next layer? ("Does the combination of the previous layer's filters make the next layer's filters?)
If so, are the combinations determined in advance?


text:
Methods for fast image comparison
I want to implement a real-time system for image comparison (e.g. compare a face with a reference one) on an Odroid. I would like to know what are the most suitable architectures for this task. I started with methods based on triplet loss (like Facenet) but I realized that a real-time solution is not feasible. Are there good, light alternatives?

The problem might not be caused by your loss function. Deep learning models tend to be computationally demanding. Mobile devices are not usually prepared for handling models with high throughput. That being said, you might try to:

Prepare smaller model - less layers, less computation
Mobile models optimization - Google provides some materials on optimizing Tensorflow models for mobile inference:
https://www.tensorflow.org/mobile/prepare_models
https://www.tensorflow.org/mobile/optimizing

For face ID, Apple is using Siamese Network. You may get a better idea here https://towardsdatascience.com/one-shot-learning-face-recognition-using-siamese-neural-network-a13dcf739e


text:
How to label “other” while labeling image for object detection/classification?
I want to train a model to recognize different category of food (example: rice, burger, apple, pizza, orange,... )
After the first training, I realized that the model is detecting other object as food. (example: hand -> fish, phone -> Chocolate, person -> candies... )
I get a very low loss because the testing dataset and validation must have at least a pictures of food. But when it comes to picture of object other than food, the model fails. How do label the dataset in way that the model will not do any detection if there is no food on the picture?

From how you've phrased your question I'm going to assume you've jumped in without much structured training in data science, so I'll answer at a fairly high level.
This is an inherent problem with image classification in that if your final layer only has food classes then whatever you feed in will always be classified as a type of food regardless of what is actually in the image.
There are a few techniques you could try.  The simplest and fastest being using a pre-built classifier to screen the input data for the presence of "food" and then only using your own classifier to determine what type of food it is.  Any of the open source imageNet networks would be a good step here - if that finds something with a food label then use your classifier to identify the category.  This means you won't need to retrain although you'll be at the mercy of any errors in the pre-trained category classifier, which is outside of your control.  Here's a good how to guide: https://www.learnopencv.com/keras-tutorial-using-pre-trained-imagenet-models/
Another option is to add a negative class to your data set consisting of non-food items that you label "other".  This is probably trickier as you'd need to cover all the non-food categories that your network will see and ensure that it doesn't learn the background.
Take a look at your final level and make a call about whether to accept the top result or not. You're forcing a choice and these values may give a clue as to the level of error in the prediction.

thanks for your reply. Could you please explain why should I ensure that "it doesn't learn the background" ?

You want your network to learn about the objects and not the background.  If your "other" set has something common in the background then your may find that your other class picks up on that instead, even if there is food in the image.  For a very trivial example, lets say that all your food classes were on white plates, and all your "other" class had darker backgrounds, your network might learn that dark equalled "other" and white meant food so you would get food on dark plates falsely labelled as other and potentially images that had pale discs being classified as food.


text:
A neural network to learn the connection between two images
Is it possible to build a neural network that learns the connection between two images?
Let's say I have a number of X images that related to Y images. How can I build a neural network that takes an image as an input and outputs (generates) the output image?
The Y images are generated by applying some function to the X images.
Do I need a generate neural network for that? Are conventional neural networks capable of classification only?

It is possible to have both input and output be images that differ in a predictable way. For example, architectures similar to autoencoders have been used to remove blur, change weather conditions, change between day and night photos etc. In these architectures, the training data is matching pairs of images. If your goal is to replicate some image enhancement, then often the input is artificially processed e.g. to reduce its quality in a hard to reverse way. A good example of this would be to remove distortion or noise from an image.
You can also use generative models. These are  harder to get working, but can be more flexible in that you don't need image pairs in order to train, just a set of images labelled with the traits that you want to learn. Converting an image using a generative model involves using an encoder stage to get its embedding, altering the embedding based on label you require and then feeding the new embedding into the decoder stage. This is how you might alter a face portrait from male to female, or young to old, because it is not possible to find good natural image pairs for that task.

Sure, for example for removing visual noise.
Look up noise2noise by NVIDIA. The made a net that is capable of removing almost
all noise from one picture.
https://hothardware.com/news/nvidia-noise2noise-machine-learning-ai-magically-restores-your-grainy-photos


text:
Does epsilon-greedy approach always choose the "best action" (100% of the time) when it does not take the random path?
I'm now reading the following blog post but on the epsilon-greedy approach, the author implied that the epsilon-greedy approach takes the action randomly with the probability epsilon, and take the best action 100% of the time with probability 1 - epsilon.
So for example, suppose that the epsilon = 0.6 with 4 actions. In this case, the author seemed to say that each action is taken with the following probability (suppose that the first action has the best value):

action 1: 55% (.40 + .60 / 4)
action 2: 15%
action 3: 15%
action 4: 15%

However, I feel like I learned that the epsilon-greedy only takes the action randomly with the probability of epsilon, and otherwise it is up to the policy function that decides to take the action. And the policy function returns the probability distribution of actions, not the identifier of the action with the best value. So for example, suppose that the epsilon = 0.6 and each action has 50%, 10%, 25%, and 15%. In this case, the probability of taking each action should be the following:

action 1: 35% (.40 * .50 + .60 / 4)
action 2: 19% (.40 * .10 + .60 / 4)
action 3: 25% (.40 * .25 + .60 / 4)
action 4: 21% (.40 * .15 + .60 / 4)

Is my understanding not correct here? Does the non-random part of the epsilon (1 - epsilon) always takes the best action, or does it select the action according to the probability distribution?

Epsilon-greedy is most commonly used to ensure that you have some element of exploration in algorithms that otherwise output deterministic policies.
For example, value-based algorithms (Q-Learning, SARSA, etc.) do not directly have a policy as output; they have values for states or state-action pairs as outputs. The standard policy we "extract" from that is a deterministic policy that simply tries to maximize the predicted value (or, technically, a "slightly" nondeterministic policy in that, in proper implementations, it should break ties (where there are multiple equal values at the top) randomly). For such algorithms, there is not sufficient inherent exploration, so we typically use something like epsilon-greedy to introduce an element of exploration. In these cases, both of the possible explanations in your question are identical.
In cases where your algorithm already produces complete probability distributions as outputs that do not so much focus all of the probability mass on a single or a couple of points, like the probability distribution you gave as an example in your question, it's generally not really necessary to use epsilon-greedy on top of it; you already get exploration inherently due to all actions having a decent probability assigned to them.
Now, I've actually personally mostly worked with value-based methods so far and not so much with e.g. policy gradient methods yet, so I'm not sure whether there tends to be a risk that they also "converge" to situations where they place too much probability mass on some actions and too little on others too quickly. If that's the case, I would expect an additional layer of epsilon-greedy exploration might be useful. And, in that case, I would indeed find your explanation the most natural. If I look through, for example, the PPO paper, I didn't find anything about them using epsilon-greedy in a quick glance. So, I suppose the combination of epsilon-greedy with "nondeterministic" policies (ignoring the case of tie-breaking in value-based methods here) simply isn't really a common combination.

You are right that policy gradient methods are often inherently stochastic and on-policy. Adding exploration functions is possible but immediately makes them off-policy. Deterministic Policy Gradient is an example of that. Policy Gradient methods cannot use epsilon greedy or even plain greedy over the value function as the learned policy, because it is not differentiable.

@NeilSlater I'm not 100% sure on the "adding exploration immediately makes them off-policy". In the case of value-based methods, Sarsa is also on-policy but generally used in combination with epsilon-greedy. In the case of DPG, the impression I got from a very quick glance through the paper is that they really want to learn something deterministic in the first place, and then of course you get off-policyness since you need exploration during training. Differentiability is an important point I forgot about though!

I meant that in the context of policy gradient methods. SARSA does not "add" epsilon greedy, it directly evaluates the current best epsilon greedy policy. If you add a higher epsilon to it, for more exploration, then yes it would become off-policy. You could use Expected SARSA as an off-policy method to do just that - learn optimal policy for epsilon 0.1 when behaving with policy for epsilon 0.3

Let me give an example of where epsilon-greedy comes unstuck: Imagine you have a environment with a very large branching-factor, like Go; if you were using epsilon-greedy for your exploration then you may find levels higher up the search tree are very well explored because they're hit on more regularly and so you'd want to select more greedily for those areas that are well explored, but further down the tree where actions are not explored you'd want to encourage more level of random exploration. Epsilon-greedy doesn't enable you to do that; it's one probability for all situations.  So it's fine to use where the state-space is quite small, but not for large state-spaces.
Actor-critic methods, such as PPO, use the entropy (the measure of randomness) of the policy to form part of the loss function which inherently encourages exploration. To elaborate on this; early in training you'd expect high levels of entropy as all actions may have near-equal probability of being selected, but as the model explores the actions and garners rewards, it will gradually favour taking the actions which lead to higher rewards, and so the entropy will decrease as training progresses and it gradually starts to behave more greedily.
Because the entropy is added to the loss (or reward in case of RL, i.e. negative loss), the agent will get a higher reward if it were to select an action with low probability but ended up getting a high reward. That will have the effect of pushing up its probability of being re-selected again in future, while pushing down the previously more-favoured action probability.
This is good because it ensures there is always some element of curiosity, and it means it will act greedily in areas of the state-space it's already well explored, but continue to explore areas of the state-space which it's unfamiliar, which is why (in my opinion) it's a superior method than using epsilon-greedy.
That said, what I personally do is once training is converged, which I define as the agent isn't garnering higher rewards and there's very low entropy in the policy, then I add some small amount of epsilon-greedy just to force some level of exploration.


text:
What kind of problem is "email text extraction"?
I need to retrieve just the text from emails. The emails can be in HTML format, and can contain huge signatures, disclaimer legalese, and broken HTML from dozens of forwards and replies. But, I only want the actual email message and not any other cruft such as the whole quotation block, signatures, etc.
This isn't really a problem that could be solved with regex because HTML mail can get very, VERY messy.
Could a neural network perform this task? What kind of problem is this? Classification? Feature selection?

It's certainly possible to treat this as a natural language processing problem, basically you're looking to assign "salience" scores to the text.
Really, though, that's overkill for this kind of problem. Writing a regex or a CFG parser (or better: finding an existing parser) is likely to be easier and more reliable.

Regex are out of the question. This problem cannot be solved by regex since the inputs are public and I can't write one for every mail software out there. The Talon library "sort of" does this, but the regex only "sort of" works for english.

I suspect you'd still find something like a CFG parser (e.g. made with YACC) more reliable and easier. While there are a lot of mail clients, you'd probably get 80%+ of traffic by covering the biggest 3 of them (outlook, gmail, thunderbird?). If you really can't use one, then "salience" scores are probably your best bet. There are some good python libraries for this I think: http://www.nltk.org/

Talon actually does this. It claims that 90% of the time the "simple" approach works, and for the remaining 10% they used scikit-learn to train a model with the ENRON emails. I've tested the library. It  works perfectly with some emails, but fails miserably with others. The "others" are malformed HTML emails (companies like to slap their stupid, useless legalese right at the server to every outgoing email, breaking HTML mail)

It sounds like your concern is with very esoteric formats. The reason Talon's approach doesn't work for those is that they're 'out-of-sample': the ENRON dataset is just internal emails from ENRON, and won't include exotic cases. If you want to build something similar that does work for those cases, you'll need to gather many examples of the cases you want to cover, and then build your own model to cover the extra 10%. I suspect you'd still find it easier to do a CFG though... you'll likely need fewer examples for that, and the structured nature of HTML gives you a big leg up.

Let's change the focus a bit. The problem not really the extraction of text from emails, but rather how to classify the emails. I've told management maybe the way is not to try and use the current neural network (trained with text-only messages from twitter and facebook), but instead train another one with the full body of emails. Let the neural network learn to ignore HTML tags and legalese. We have about 1000 incoming emails every day so it's easy to get large datasets.

Ah! This clarifies things a lot. I think you should actually just use the raw text. Don't bother filtering out the unneeded HTML tags. If those turn out not to be useful, the network will learn to ignore them. If they turn out to be useful, the network will use them. In fact, this is the approach used by many email classification systems, not just neural nets (see, for instance, DMC and other compression-based approaches).

The only other thing i'm worried about are long reply streams. Is there a way to tell the network that the deeper some text is into a string, the less relevant it may be?. I still think some sort of filtering will be needing. I spent most of today looking for patterns. gmail is nice enough to use blockquote and other gmail_* classes that make it easy to detect replies ("gmail_quote").

Let us continue this discussion in chat.

As a follow up: I spent the last 2 days writing regex to catch most of the signature and reply blocks. I found about 20 patterns in the sample of 1000 emails I took. while it's not perfect, it seems to be "good enough". the worst offender is, of course, Outlook, which seems to divide the replies with a div (because  isn't good enough for microsoft). and this div depends on the user's language. Sometimes it specifies a height of 0cm, other times 0in... unbelievable.

It is a surmountable problem for someone experienced in software architecture and machine learning.

Render the message to a virtual display such as xvfb, headless Chrome, or phantomjs.
Capture the text with selenium, watir, or some other DOM controller, addressing your HTML and DHTML complexity concern.
OCR the text in inline images and insert it appropriately.
Once you have text with only word, line, list item, and paragraph breaks as structural separators, you have adequate separation of style and language content to then use naive Bayesian or one of the more recent forms of unsupervised categorization to find the separation point between the body and the signature block.

Extending your line of thinking, you may even be able to engineer a generative strategy for automated reply, but beware, this last feat is a dozen orders of magnitude more difficult than extracting text from HTML, DHTML, and typeset images and machine learning the separating signature blocks.
This last feat, if done poorly, would get you in trouble with many of your email reply recipients, and, if done well, would place you ahead of Amazon, Apple, and Google.

Intriguing. I was actually wondering how to deal with the broken HTML usually found in emails. The second part you mention is irrelevant for us since the service we sell is actually humans to respond. But we need help categorizing the inputs and try and deliver to the right person. We're already doing this with tweets and facebook messages which are trivial being text-only. But email is a different beast.


text:
Training a CNN from scratch over COCO dataset
I am using Tensorflow Object Detection API for training a CNN from scratch on COCO dataset. I need to use this specific configuration.
There is no pre-trained model on COCO with that configuration and this is the reason why I am training from scratch.
However, after 1 week of training and evaluating each checkpoint generated by the training phase this is how my learning phase appears on Tensorboard:

Thus, my questions are:

does anyone know how many iterations approximately will be necessary? Right now I did more than 500'000 iterations.
How can be possible that after 500'000 the evaluation is 0,8%? I would expected something like 60-70%.
Why does there is a sudden drop after 500k iterations? I thought that the eval was supposed to converge to some limit. (this is what SGD should do)
Is there any 'trick' to speed up the training phase? (ex: increasing the learning rate, etc).

It might be useful to know a little more about your problem. What would the precision of guessing uniformly at random look like? How much data do you have?
Note too, that SGD is not guaranteed to converge smoothly, because you might update repeatedly based on an unfortunate random sample. It converges only in expectation.

I'm training on coco dataset, which is 18GB of labeled data. I've no idea how much the precision of guessing uniformly at random should look like.

It's hard to know for sure what's gone wrong, but here are some possibilities:

The problem is difficult. The COCO  paper reports that a typical object covers just 4-6% of the image. A randomly initialized model is therefore likely to do extremely poorly, with an expected precision of between 4 and 6% for detecting the object of interest in a frame. You also have 90 classes in your configuration file. It's not clear whether the model has access to the correct label, but if it's also inferring the class, we'd expect initial accuracy somewhere around 0.06%. That's actually about the precision of your starting model.
You're training on mini-batches of size 32. It's not clear to me from your config whether the lower axis of that graph is iterations or epochs. If it's the former, then your model will have seen only 1.5 million examples during the entire training period. For a problem this hard, that's not nearly enough. Indeed, COCO contains only 328k unique examples, so the model would have seen each of them just 5 times (corresponding to 5 epochs). If you've done 500,000 epochs though, then that ought to be enough.
It's possible that the hyper-parameters are not well set. I'm not an expert at training CNNs, but deep networks are notoriously finicky. I have difficulty reading your config file, but your learning rate looks reasonable to me. It also appears to undergo exponential decay over time though, and it's not clear to me that you want to be doing that, or whether the schedule you're using for the decay makes sense. This might be worth reviewing.

Thank you John Doucette for providing me such a detailed answer. Anyway:

Right now I got 8% accuracy
The lower axis represents a training step(=one gradient update).
I can't change hyperparameters. I can't change anything into the configuration. This is because I'm working with the new Google Vision Kit and this is the only configuration compatible.

PS: the drop in accuracy happened because I tried to set a learning rate 10 times higher than the original. As soon as I realized that accuracy was decreasing I re-set the learning rate as the beginning and then the accuracy started to increase again. This is the result (almost 700k iterations): https://ibb.co/fKFwbU

Checking the TF documentation I can say that, for instance, if iteration 50 means we're processing the 50th batch.

@GiacomoBartoli Ah, if 50 iterations = 50 batches, you'll need to train a while longer! Probably on the order of 100 times longer would be my guess.

100 times longer means something like 100 weeks = 23 months of training. The real question is: when someone trains a network from scratch, which accuracy level is expected to obtain before move on and apply transfer learning?
What developers do, typically, is to start from a pre-trained model and then train only the last layers on a custom dataset (this is what I mean for transfer learning).
How much accuracy does the pre-trained model have?


text:
How should continuous action/gesture recognition be performed differently than isolated action recognition
I am going to train a deep learning model to classify hand gestures in video. Since the person will be taking up nearly the entire width/height of the video and I will be classifying what hand gesture he or she is doing, I don't need to identify the person and create a bounding box around the person doing the action. I only need to classify video sequences to their class labels.
I will be training on a dataset with individual videos, in which each entire video clip is the particular gesture (So it's a dataset like UCF-101, with video clips corresponding to class labels). But when I am deploying the network, I want the neural network to run on live video. As in how the live video is playing, it should recognize when a gesture has occurred and indicate that it recognized the gesture.
So I was wondering - How can I train the neural network on isolated video sequences in which the entire video clip is the action (like explained above), but run the neural network on live video? For instance, can I use a 3D CNN? Or must I use a 2D CNN with an LSTM network instead, for it to work on live video? My concern is that since a 3D CNN performs the filters across many frames, wouldn't running the CNN on every frame make it very slow? But if I use a 2D CNN with LSTM, will that make it faster? Or will both work fine?
Thank you for your help in advance.

This question actually includes many. I try to answer a couple.
First of all, you need to make sure for your use case to know the non-functional requirements. It is helpful to know that you have a soft real-time case (if harm is done in case of too late predictions it might also be hard real-time)

Latency: how much time may pass after the action was made until the prediction is there?
Stability of prediction: how fast it's the system allowed to change it's prediction? Once every 0.5s?
General hardware, especially memory usage
Optimization metric: maybe accuracy does not tell you enough?
Evaluation setup: likely, you need to have multiple "evaluation points" per video, e.g. Once after the system had one second, once after it had 1.5,... You will also want to consider the stability of the prediction.

Now to the question about how you can do that. If you didn't try it so far, I recommend looking at optical flow.


text:
Which features of a data set can be used for market campaigning using propensity scores?
A dataset contains so many fields in which there is both relevant and irrelevant field. If we want to do a market campaigning using propensity scoring, which fields of the data set are relevant?
How can we find which data field should be selected and can drive to the desired propensity score?

The problem you are examining is called feature selection. There are many different techniques, but they fall broadly into three categories:

Filter approaches determine which features have high information content. A common approach is to score them based on their information gain.
Wrapper approaches score subsets of the features, using similar measurements. This is slower (since there are many subsets), but may yield better performance.
Embedded approaches use machine learning algorithms that can dynamically select features. For example, building a C4.5 decision tree learner on a dataset, and then selecting just the features that actually appear in the tree, yields a set of features similar to those found by information gain.


text:
Sequence to sequence machine learning / NMT - converting numbers into words
I want to do some sequence to sequence modelling on source data that looks like this:
/-0.013428/-0.124969/-0.13435/0.008087/-0.269241/-0.36849/

with target data that looks like this:
Dont be angry with the process youre going through right now

Both are of indeterminate lengths, and the lengths of target and source data aren't the same. What I'd like to do is have a prediction model where I can input similar numbers and have it generate texts based on the target training data.
I started off doing character level s2s, but the output of the model is too nonsensical even at 2-5k epochs. So I've been looking into word level s2s and NMT, but the tutorials always assume strings of text as the target and source, and I keep running into roadblocks trying to preprocess the text, when all the tutorials assume a certain syntax/set of characters. This is my first try at ML, and some of the tutorials really throw me out with the text preprocessing requirements.
Am I going down the right avenue looking at word level/NMT stuff? And is there a tutorial I've missed for something like what I'm trying to build?


text:
Alternative to sliding window neural network (was: Object detect (or) image classification at specific locations in the frame)
Recent advances in Deeplearning and dedicated hardware has made it possible to detect images with a much better accuracy than ever. Neural networks are the gold standard for computer vision application and are used widely in the industry, for example for internet search engines and autonomous cars. In real life problems, the image contains of regions with different objects. It is not enough to only identify the picture but elements of the picture.
A while ago an alternative to the well known sliding window algorithm was described in the literature, called Region Proposal Networks. It is basically a convolution neural network which was extended by a region vector.
Problem that I am trying to solve:
In a given video frame, I want to pick some region of interests (literally), and perform classification on those regions.
How is it currently implemented

Capture the video frame
Split the video frame into multiple images each representing a region of interest
Perform image classification(inference) on each of the image (corresponding to a part of the frame)
Aggregate the results of #3

Problem with the current approach
Multiple inferences per frame.
Question
I am looking for a solution where I specify the locations of interest in a frame, and inference task, be it object detection (or) image classification, is performed only on those regions.Can you please point to me the references which I need to study (or) use to do this.

Is your requirement to supply your own "region of interest" data fixed? That would rule out architectures like YOLO, which do very close to what you want overall, but internally decide on locations.

There are many different problems in computer vision. Four of them are well described by the top image here:

Classification: Given an image, say what is on it (a single thing)
Classification+Localization: Given an image, say what is on it and draw an axis-aligned bounding box (AABB) around it
Object detection: Given an image, draw AABBs around every object and classify those objects
Semantic segmentation: See Survey of semantic segmentation
Instance segmentatation: Like semantic segmentation, but if there are multiple cats then they should be recognized as different objects.

Your question seems to be about object detection. The relevant papers here are:

SSD: Single Shot MultiBox Detector: Code
You Only Look Once: Unified, Real-Time Object Detection (YOLO): Website with video
YOLOv3

If you actually already have the regions, then you can simply perform classification on them. When you pad / scale / crop them, you can batch-predict them.


text:
Optimizing image recognition results for unknown labels
I’m training a network to do image classification on zoo animals.
I’m a software engineer and not an ML expert, so I’ve been retraining Google’s Inception model and the latest models is trained using Google AutoML Vision.
The network performs really well, but I have trouble with images of animals that I don’t want any labels for. Basically I would like images of those animals to be classified as unknowns or achieve low scores.
I do have images of the animals that I don’t want labels for and I tried putting them all into one “nothing” label together with images I’ve collected of the animals habitats without any animals. This doesn’t really yield any good results though. The network performs for the labeled animals but ends up assigning one of those labels to the other animals as well. Usually with a really high score as well.
I have 14 labels and 10.000 images. I should also mention that the “nothing” label ends up having a lot of images compared to the actual labels. Those images are not included in the 10.000.
Is there any tricks to achieve better results with this? Should I create multiple labels for the images in the “nothing” category maybe?

Just going off of what you said have you tried using fewer nothing images as "nothing", like 750 or so?

Welcome to AI.SE @Stromgren!
A likely explanation is that the animals in the "nothing" group do not have much in common with each other.
This means it will be difficult for the network to learn which features from the images are associated with that label (in fact, there aren't any!). As a result, the network is probably assigning very low confidence to any estimate for the nothing label. You should be able to check if this is the case (i.e. examine whether it is ever confident about the label "nothing").
I am not completely sure how the Inception network encodes its labels. A common scheme though is to use one output neuron for each class. The correct label for an image is thus always a "1-hot" vector, where one of the elements is set to 1, and the others all to zero.
If that representation is being used, you can incorporate the "nothing" data by labelling it with a vector that is all zero: none of the output neurons should activate for it. That would produce precisely the training signal you want.


text:
Tuning of PPO metaparameters: a high level overview of what each parameter does
I am using the PPO algorithm implemented by tensorforce: https://github.com/reinforceio/tensorforce . It works great and I am very happy with the results.
However, I notice that there are many metaparameters available to give to the PPO algorithm:
 # the tensorforce agent configuration ------------------------------------------
    network_spec = [
        dict(type='dense', size=256),
        dict(type='dense', size=256),
    ]

    agent = PPOAgent(
        states=environment.states,
        actions=environment.actions,
        network=network_spec,
        # Agent
        states_preprocessing=None,
        actions_exploration=None,
        reward_preprocessing=None,
        # MemoryModel
        update_mode=dict(
            unit='episodes',
            # 10 episodes per update
            batch_size=10,
            # Every 10 episodes
            frequency=10
        ),
        memory=dict(
            type='latest',
            include_next_states=False,
            capacity=200000
        ),
        # DistributionModel
        distributions=None,
        entropy_regularization=0.01,
        # PGModel
        baseline_mode='states',
        baseline=dict(
            type='mlp',
            sizes=[32, 32]
        ),
        baseline_optimizer=dict(
            type='multi_step',
            optimizer=dict(
                type='adam',
                learning_rate=1e-3
            ),
            num_steps=5
        ),
        gae_lambda=0.97,
        # PGLRModel
        likelihood_ratio_clipping=0.2,
        # PPOAgent
        step_optimizer=dict(
            type='adam',
            learning_rate=1e-3
        ),
        subsampling_fraction=0.2,
        optimization_steps=25,
        execution=dict(
            type='single',
            session_config=None,
            distributed_spec=None
        )
    )

So my question is: is there a way to understand, intuitively, the meaning / effect of all these metaparameters and use this intuitive understanding to improve training performance?
So far I have reached - from a mix of reading the PPO paper and the literature around, and playing with the code - to the following conclusions. Can anybody complete / correct?

effect of network_spec: this is size of the 'main network'. Quite classical: need it big enough to get valuable predictions, not too big either otherwise it is hard to train.
effect of the parameters in update_mode: this is how often the network updates are performed.

batch_size is how many used for a batch update. Not sure of the effect neither what this exactly means in practice (are all samples taken from only 10 batches of the memory replay)?
frequency is how often the update is performed. I guess having frequency high would make the training slower but more stable (as sample from more different batches)?
unit: no idea what this does

memory: this is the replay memory buffer.

type: not sure what this does or how it works.
include_next_states: not sure what this does or how it works
capacity: I think this is how many tuples (state, action, reward) are stored. I think this is an important metaparameter. In my experience, if this is too low compared to the number of actions in one episode, the learning is very bad. I guess this is because it must be large enough to store MANY episodes, otherwise the network learns from correlated data - which is bad.

DistributionMode: guess this is the model for the distribution of the controls? No idea what the parameters there do.
PGModel: No idea what the paramaters there do. Would be interesting to know if some should be tweaked / which ones.
PGLRModel: idem, no idea what all these parameters do / if they should be tweaked.
PPOAgend: idem, no idea what all these parameters do / if they should be tweaked.

Summary
So in summary, would be great to get some help about:

Which parameters should be tweaked
How should these parameters be tweaked? Is there a 'high level intuition' about how they should be tweaked / in which circumstances?

Some investigation about the memory dict: The current type is latest, which means you're not using a memory replay, but a latest memory. Switching to replay may help.
Also, include_next_state means that you store tuples (state, action, reward, next state). It's not a real parameter though, because in PPO it must be set to False, otherwise an error is raised.
Your interpretation of capacity looks OK.
About the update mode spec dict, your current settings mean that : every 10 (frequency) episodes (unit), you pull a batch of 10 (batch_size) episodes (unit) from the memory (the pulling method is defined through the memory dict), and you perform an optimization step over this batch. Be aware that the unit defines both the unit of the optimization frequency and the type of the object fetched from the memory.


text:
How is it possible to teach a neural network to perform addition?
I am trying to understant how it works.  How do you teach it say, to add 1 to each number it gets.  I am pretty new to the subject and I learned how it works when you teach it to identify a picture of a number.  I can understand how it identifies a number but I cant get it how would it study to perform addition? I can understand that it can  identify a number or picture using the pixels and assigning weights and then learning to measure whether a picture of a number resembling the weight is assigned to each pixel. But i can't logically understand how would it learn the concept  of adding a number by one.  Suppose I showed it thousands of examples of 7 turning to 8 152 turning into 153 would it get it that every number in the world has to be added by one? How would it get it having no such operation of + ? Since addition does not exist to its proposal then how can it realize that it has to add one in every number? Even by seeing thousands of examples but having no such operation of plus I cant understand it.    I could understand identifying pixels and such but such an operation I cant get the theoretical logic behind it. Can you explain the logic in layman terms?

"having no such operation of plus..." why do you say this? Neural networks perform linear combinations of inputs, followed by non-linearities. Of course they have the + operation!

Welcome to AI.SE @bilanush.
Here's an example approach that might make things clearer. There are other ways to train a neural network to do this however.
In your earlier example with an image, you probably noticed that the network receives the image as a series of values, representing each pixel in the image. The network then learns which of a series of output neurons should be active in response to a given set of pixel values. Those output neurons, when read in an appropriate way, correspond to the correct label for the image. The difference between the set of outputs that should have been active, and the set that were active, forms the basis of the error signal that allows the network to learn.
You've probably heard that computers represent numbers with binary digits. So you could think of the number 16 as being: 00010000 in "8-bit binary". In 16-bit binary, this number would be 0000000000010000, and so on.
So one way of viewing your problem is a function mapping binary inputs to binary outputs (very similar to labelling a black-and-white image). For instance, the input 00010000 (16) should produce the output 00010001 (17). The input 00100011 (35) should produce the output 00100100 (36), and so on.
As before, you will have a set of output neurons. In this case, it should be wide as the set of input neurons. As before, the error signal is the difference between the expected inputs and outputs.
As to the question of how they can learn this function "without plus", in fact the individual neurons in a network perform just two operations: addition of their inputs, and a non-linear transformation of the sum. It has been proven that these are sufficient to learn any function from inputs to outputs, as long as the network contains 3 layers or more, and the as long as the middle layer is wide enough, but here it should be easy to see how addition might emerge.

@DuttaA I think you are mistaken: a sufficiently wide and deep network can learn this pattern and extrapolate to unseen examples. In particular, since the pattern is a series of full-adder gates, it can be done simply with a network that has depth and width proportionate to the number of bits. I agree with your answer that there are better approaches to solving this problem, but they may be harder for a novice to follow.


text:
How to model categorical variables / enums?
I am new to the field and I am trying to understand how is possible to use categorical variables / enums?
Lets say we have a data set and 2 of its features are home_team and away_team, the possible values of these 2 features are all the NBA teams.
How can we "normalize" these features to be able to use them to create a deep network model (e.g. with tensorflow)?
Any reference to read about techniques of modeling that are also very appreciated.

Authors use many different approaches.
One approach is to have a different input neuron for each possible category, and then use a "1-hot" encoding. So if you have 10 categories, then you can encode this as 10 binary features.
Another is to use some sort of binary encoding. If you have 10 categories, it is sufficient to use 4 neurons to represent all possible categories by using binary numbers.
A third approach is to convert your categories to cardinal values, and then normalize them. This may be more effective if your categories really are cardinal (i.e. orderable). If there isn't a natural ordering to them though, this might lead to strange results or make the problem difficult to learn (since it ends up embedding non-linear relationships in the learning problem that don't need to exist).

@DuttaA I agree. It has many of the same problems as a cardinal encoding (i.e. introducing non-linear patterns to learn). I have seen it used from time to time however.

A one-hot encoding, as described in John's answer, is probably the most straightforward / simple solution (maybe even the most common?). It is not without its problems though. For example, if you have a large number of such categorical variables, and each has a large number of possible values, the number of binary inputs you need for one-hot encodings may grow too large.

Lets say we have a data set and 2 of its features are home_team and away_team, the possible values of these 2 features are all the NBA teams.

In this specific example, a different possible solution might be not to use the "identity" of a team as a feature itself, but try to find a number of (ideally numeric) features corresponding to that team.
For example, instead of trying to encode "home_team" in some way in your inputs, you could (if you manage to find the data you need to do this) use the following features (not really familiar with NBA, so not sure if all these make sense):

Win percentage of home_team in recent X amount of time
Historical win percentage of home_team against away_team
Average points scored per match by this team
In football there's something like how many minutes per game a team is "in control" of the ball, is there something similar in NBA maybe?
etc.

And then you can try to get a similar list of features for the away_team.
This kind of solution would work for your example, and maybe also for various other examples. It might not work in all cases of categorical features though, in some cases you'd have to revert to solutions like those in John's answer.


text:
Automatic prediction of whether a customer will come into the shop or not
So as my university project I am planning to make a prediction system as described in the title. My current idea is to use the age/gender classifier and run it on a video(taken in front of a shop) which outputs a csv file of the age/gender/Customer ID. In addition, I will use the existing data of the shop of who came in/who didn't come into the shop but passed by the shop and by running XGBoost on this csv data I can predict which customer will come into the shop or not.
Do you think this idea is possible? Is there any other way to implement this idea. It would also be great if we could implement this in such a way as to make the deep learning model learn the various features of those who come into the shop or not.

Yup, that's exactly what I thought. Is it possible for the model to learn features(neural network) given the input video file?

I think it's hard to tell from a short video of a camera, if a customer come into the shop or not.... I guess the only way to do so is actually to see the direction where the person goes... But as @JohnDoucette said in the answer, the only way to know is to try.....

This should be possible, but it's not completely clear what you are trying to do.
If you're trying to predict customer age and gender from a video, then you've got a computer vision problem. Deep learning methods are the state of the art for this, and probably some sort of convolutional deep neural network is your friend.
If you're trying to predict whether the customer will enter the shop from their age and gender, then @DuttA suggestion to start with simple classification techniques is probably the best bet. Try out logistic regression as a starting point.
If you really want to do both of these things at once, you can again try out a deep convolutional neural network.
All that said, it's not completely clear that there is signal in the videos you want to collect: it might be that predicting whether they'll enter the shop is not really possible on the basis of a short video. The only way to know for sure is to give it a try however.

Thank you very much for your answer. If I were to use CNN to complete both the tasks at once, do I still need to annotate the features(age,gender,etc)? To be clear what I aim to do is to identify the customer features and predict whether they come into the shop or not in one go(The third option you mentioned). I am also planning to train the model to classify a new type of images(such as company worker, housewives,etc).

@DukeGlacia If you annotate with features that are actually predictive, then your model should learn faster. If you annotate with features that are not predictive, it might actually slow things down though.

This might be a very dumb question but why did it take a long time to achieve a facial recognition system of reasonable accuracy? Isn't it sufficient to feed the data with lots of images?
I'm starting to think my project may face the same type of problem. i.e too many features to learn but very fewer data.

@DukeGlacia it take a very large number of images, and a very large amount of computational time. If you don't have a pretty large number of images (at least many thousands), then this probably won't work.

Thanks a lot. Additionally, given that my I have sufficient data. Is it possible to detect the object from a video file and output(the customer data) as a csv file?

@DukeGlacia Yes, if you program your system to output a cvs, it should work fine.

I see. So it wouldn't be a problem to train on still images and test on video images? (I guess there shouldn't be any problem as videos are just a series of photos?)

@DukeGlacia That is probably okay. You'll have better luck if you keep as much as possible consistent across the training and test images though.


text:
Can I reduce the "number of weights" in CNN to 1/3 by restricting the input as greyscale image?
In a CNN, does each new filter have different weights for each input channel, or are the same weights of each filter used across input channels?
This question helps me a lot.
Let, I have RGB input image. (3 channels)
Then each filter has n×n weights for one channel.
It means, actually the filter has totally 3×n×n weights.
For channel R, it has own n×n filter.
For channel G, it has own n×n filter.
For channel B, it has own n×n filter.
After inner product, add them all to make one feature map.
Am I right?
And then, my question starts here.
For some purpose, I will only use greyscale images as input.
So the input images always have the same values for each RGB channel.
Then, can I reduce the number of weights in the filters?
Because in this case, using three different n×n filters and adding them is same with using one n×n filter that is the summation of three filters.
Does this logic hold on a trained network?
I have a trained network for RGB image input, but it is too heavy to run in real time.
But I only use the greyscale images as input, so it seems I can make the network less heavy (theoretically, almost 1/3 of original).
I'm quite new in this field, so detailed explanations will be really appreciated.
Thank you.

Yes, right. And it's impossible to retrain because I don't have training set...

Sum up : No you don't reduce your number of weights by 3, you reduce your first layer number of weights by 3 only !

@Jun Then maybe you should stay with the former CNN model. Or maybe try to reduce the number of weights, but it's not obvious that the network works better....

Unless you have some very unusual images (e.g mostly one colour) then this is a very bad way to improve inference performance as anything you do will badly affect accuracy. If you don't have access to training data to retrain a network you should look into other routes (e.g TensorRT or better hardware) to improve inference performance.

After inner product, add them all to make one feature map. Am I right?

yes, you are right.

Then, can I reduce the number of weights in the filters? Because in this case, using three different n×n filters and adding them is same with using one n×n filter that is the summation of three filters.

If you have transformed the image into greyscale then you no longer need 3 filters. You should retrain your model on greyscale images. In a greyscale image the value of each pixel is a single sample representing only an amount of light (the light intensity).
The network will run faster if that is the only architectural change you make, but keep in mind that by converting the image to greyscale you will lose information and probably some of the predictive power of your network.

Thanks for your comment.
So greyscale image is the one-channel image, right?
But I can't retrain it because I don't have training samples.
What if I use RGB image with same values for each channel?
It would be same with one channel grey scale image.

No. It will almost certainly work badly. Each of the three RGB channels contains information about the light intensity for each of those colours. You may get some results by selecting a channel and its filter (e.g using only the red channel and filter for each image) and upscaling the weights, but this will certainly badly reduce the accuracy of your network. Also, if you have many hidden layers the performance improvement will be very small since the amount of computation after the first CNN layer will be exactly the same.

Colour is very important to classify images. Imagine fruit for example, which rely a lot of the color of the object.


text:
How does the degree of neuronal realism affect computing in a deep learning scenario?
Neurons can be simulated using different models that vary in the degree of biophysical realism. When designing an artificial neuronal network, I am interested in the consequences of choosing a degree of neuronal realism.
In terms of computational performance, the FLOPS vary from integrate-and-fire to the Hodgkin–Huxley model (Izhikevich, 2004). However, properties, such as refraction, also vary with the choice of neuron.

When selecting a neuronal model, what are consequences for the ANN other than performance? For example, would there be trade-offs in
terms of stability/plasticity?
Izhikevich investigated the performance question in 2004. What are
the current benchmarks (other measures, new models)?
How does selecting a neuron have consequences for scalability in terms of hardware for a deep learning network?
When is the McCulloch-Pitts neuron inappropriate?

References
Izhikevich, E. M. (2004). Which model to use for cortical spiking neurons? IEEE Transactions on Neural Networks, 15(5). https://www.izhikevich.org/publications/whichmod.pdf

@DuttaA I am new to the field, but from my brief literature review this seems to be a possibility: http://www.scholarpedia.org/article/Deep_Learning#Deep_Learning_with_Spiking_Neurons.3F Perhaps I should have asked more explicitly about the current state of the art of using spiking neurons for ANNs.


text:
Adding voices to voice synthesis corpuses
If one uses one of the open source implementations of the WaveNet generative speech synthesis design, such as https://r9y9.github.io/wavenet_vocoder/, and trains using something like the CMU's arctic corpus, now can one add a voice that sounds younger, older, less professional, or in some other way distinctive.  Must the entire training begin from scratch, or is there a more resource and time friendly way?

The original wavenet and the implementation you linked to is globally conditioned on speaker embeddings, which means that the network was given a unique identifier for the person speaking each time it trained on an audio clip. This allows the network to learn to mimic the voice of each person in the training data, but it only learns their voices, not arbitrary people's voices.
You might be able to do what you're describing by globally conditioning on different features of the speakers, such as age etc, though this would require a lot a speakers to span those dimensions.
I think it would definitely be possible to use style transfer for this, similar to the work done on tweaking people's age in images [1]. Some similar work has been done for audio in order to change the accent of a voices between accents [2], so I wouldn't be surprised to see more examples of this in the near future.
[1] https://www.youtube.com/watch?v=2qMw8sOsNg0
[2] https://ai.googleblog.com/2018/03/expressive-speech-synthesis-with.html


text:
Compute Jacobian matrix of Deep learning model?
I am trying to implement this paper. In this paper, the author uses the forward derivative to compute the Jacobian matrix dF/dx using chain rule where F is the probability got from the last layer and X is input image.
My model is given below. Kindly let me know how to go about doing that?
class LeNet5(nn.Module):

def __init__(self):

    self.derivative= None # store derivative

    super(LeNet5, self).__init__()
    self.conv1= nn.Conv2d(1,6,5)
    self.relu1= nn.ReLU()
    self.maxpool1= nn.MaxPool2d(2,2)

    self.conv2= nn.Conv2d(6,16,5)
    self.relu2= nn.ReLU()
    self.maxpool2= nn.MaxPool2d(2,2)

    self.conv3= nn.Conv2d(16,120,5)
    self.relu3= nn.ReLU()

    self.fc1= nn.Linear(120,84)
    self.relu4= nn.ReLU()

    self.fc2= nn.Linear(84,10)
    self.softmax= nn.Softmax(dim= -1)

def forward(self,img, forward_derivative= False):
    output= self.conv1(img)
    output= self.relu1(output)
    output= self.maxpool1(output)

    output= self.conv2(output)
    output= self.relu2(output)
    output= self.maxpool2(output)

    output= self.conv3(output)
    output= self.relu3(output)

    output= output.view(-1,120)
    output= self.fc1(output)
    output= self.relu4(output)

    output= self.fc2(output)
    F= self.softmax(output)

    # want to comput the jacobian dF/dimg
    jacobian= computeJacobian(F,img)#how to write this function

    return F, jacobian

do you want to implement this for training purpose ? because a lot of framework already do that.

No, not for training as I can do that using backward() methods. I want it during evaluation. I need to craft adversarial examples and for that, I need to modify a few pixels in the original image based on the Jacobian matrix.

When I say "training"" I was talking about you, train to write something in python. Because there are existing module in python, that does exactly what you want. Why reinventing the wheel ?

I want to compute the Jacobian matrix of the output layer F w.r.t each pixel in the input image. How to get that using modules? Also, the existing module does that using backward derivative whereas I want it using forward derivative.

Here is a module in python which implement a lot of attacks : https://foolbox.readthedocs.io/en/latest/user/installation.html You can find code which implements the JSMA attack (JacobianAttack). Myabe you can find something useful ? also worth to see : https://raghakot.github.io/keras-vis/ a module for Keras which implement saliency map creation (I know there are also other module for other framework like Tf, pytorch, but I haven't the links). Maybe you can use it, or look at the code to find ideas.

Can I achieve that using normal numpy libraries like np.gradient() or something like that?

In the paper The Limitations of Deep Learning in Adversarial Settings, Papernot et. al., 2016, IEEE the chain rule is used, "To express $\nabla F(X∗)$ in terms of $X$ and constant values only."
Earlier is stated, "Our understanding of how changes made to inputs affect a DNN’s output stems from the evaluation of the forward derivative: a matrix we introduce and define as the Jacobian of the function learned by the DNN. The forward derivative is used to construct adversarial saliency maps indicating input features to include in perturbation $\partial X$ in order to produce adversarial samples inducing a certain behavior from the DNN;"
And later, "We define the forward derivative as the Jacobian matrix of the function F learned by the neural network during training. For this example, the output of F is one dimensional, the matrix is therefore reduced to a vector (below). Both components of this vector are computable using the adversary’s knowledge, and later we show how to compute this term efficiently."
$\nabla F(X) = \Big[ \frac {\partial F(X)} {\partial X_1}, \frac {\partial F(X)} {\partial X_2} \Big] \quad\quad (2)$
Between equation (2) and equation (6) your questeion is answered, resulting in an equation where the chain rule has already been applied.
$\frac {\partial F_j (X)} {\partial x_i} = \Big(W_{n+1,j} \, . \, \frac {\partial H_n} {\partial x_i} \Big) \times \frac {\partial f_{n+1,j}} {\partial x_i} \;(W_{n+1,j} \, . \, H_n + b_{n+1,j}) \quad\quad(6)$
It is (6) that you must implement in code, but that is done after the DNN is converged as the paper states above.
Applying the Chain Rule
If $z = f(y)$ and $y = g(x)$, then $\frac {dz} {dx} = f'(g(x)) g'(x)$
Applied twice, if $w = e(z)$, $z = f(y)$, and $y = g(x)$, then $\frac {dw} {dx} = e'(f(g(x)) f'(g(x)) g'(x)$
Applied indefinitely we multiply all the first order derivatives of intermediate values, which has the following first order predicate logic expression.
$\forall \; 0 \le n \lt N \land v_{n + 1} = f_{n + 1}(v_n) \land F_{n+1}(x) = f_{n+1}(F_n(x)) \land g(a) = \dfrac {d} {d a} \, f(a)$
$\exists \; g_n(v_0) = \prod_{\,n = 1}^{\,n < N} {g_n} (F_n(v_0))$
Derivatives of convolution kernel values are the values themselves because they represent attenuation of the form $y = ax + b$.  This is true of first degree linear activation functions too.  The derivative normally used for ReLU (although the x = 0 case is actually undefined) is as follows:
$\dfrac {d} {dx} R(x) = {\begin{cases}x < 0 & 0\\x = 0 & 1\\x > 0 & 1 \end{cases}}$
The derivative of a max function used in max pool (although the u = v case is actually undefined) is as follows:
$\dfrac {d} {dt} M(u, v) = {\begin{cases}u < v & \frac {dv} {dt}\\u = v & \frac {dv} {dt}\\u > v & \frac {du} {dt}\end{cases}}$

Thanks for the answer. Once my model is trained i.e the DNN has converged, I want to compute equation (6) but I don't know how to do that when there are different types of layers like conv2d, linear, relu, maxpool etc. Could you please provide me with some simple example (in PyTorch) if possible? Thanks for your help once again.

Thanks for the answer. It was really very helpful. However, as of now, I am able to compute the Jacobian w.r.t single X. Is it possible to extend, the same technique in the case where I am working in batches?

Yes, I am referring to mini-batch.


text:
CNN Pooling layers unhelpful when location important?
I'm trying to use a CNN to analyse statistical images. These images are not 'natural' images (cats, dogs, etc) but images generated by visualising a dataset. The idea is that these datasets hopefully contain patterns in them that can be used as part of a classification problem.

Most CNN examples I've seen have one of more pooling layers, and the explaination I've seen for them is to reduce the number of training elements, but also to allow for some locational independance of an element (e.g. I know this is an eye, and can appear anywhere in the image).
In my case location is important and I want my CNN to be aware of that. ie. the presence of a pattern at a specific location in the image means something very specific compared to if that feature or pattern appears elsewhere.
At the moment my network looks like this (taken from an example somewhere):
_________________________________________________________________
Layer (type)                 Output Shape              Param #
=================================================================
conv2d_1 (Conv2D)            (None, 196, 178, 32)      896
_________________________________________________________________
activation_1 (Activation)    (None, 196, 178, 32)      0
_________________________________________________________________
max_pooling2d_1 (MaxPooling2 (None, 98, 89, 32)        0
_________________________________________________________________
conv2d_2 (Conv2D)            (None, 96, 87, 32)        9248
_________________________________________________________________
activation_2 (Activation)    (None, 96, 87, 32)        0
_________________________________________________________________
max_pooling2d_2 (MaxPooling2 (None, 48, 43, 32)        0
_________________________________________________________________
conv2d_3 (Conv2D)            (None, 46, 41, 64)        18496
_________________________________________________________________
activation_3 (Activation)    (None, 46, 41, 64)        0
_________________________________________________________________
max_pooling2d_3 (MaxPooling2 (None, 23, 20, 64)        0
_________________________________________________________________
flatten_1 (Flatten)          (None, 29440)             0
_________________________________________________________________
dense_1 (Dense)              (None, 32)                942112
_________________________________________________________________
activation_4 (Activation)    (None, 32)                0
_________________________________________________________________
dropout_1 (Dropout)          (None, 32)                0
_________________________________________________________________
dense_2 (Dense)              (None, 3)                 99
_________________________________________________________________
activation_5 (Activation)    (None, 3)                 0
=================================================================
Total params: 970,851
Trainable params: 970,851
Non-trainable params: 0
_________________________________________________________________

The 'images' I'm training on are 180 x 180 x 3 pixels and each channel contains a different set of raw data.
What strategies are there to improve my CNN to deal with this? I have tried simply removing some of the pooling layers, but that greatly increased memory and training time and didn't seem to really help.

Can you tell me more about statistical images? How should I interpret the image you posted?

How good is your current network? Which type of mistakes does it make? Have a look at chapter 2.5 of my Master's thesis for some ideas how to analyze your network.

1X1 convolution might improve accuracy as they reduce dimension in filter space.
Google inception V3 architecture would be a good starting point.
https://arxiv.org/pdf/1512.00567.pdf

Pooling doesn't completely remove information about location of features within your image. If you don't want to use pooling but want to reduce the size of your neural net layers you should try a value of stride greater than 1 in your convolutional layers. e.g:
keras.layers.Conv2D(filters, kernel_size, strides=(1, 1), padding='valid', data_format=None, dilation_rate=(1, 1), activation=None, use_bias=True, kernel_initializer='glorot_uniform', bias_initializer='zeros', kernel_regularizer=None, bias_regularizer=None, activity_regularizer=None, kernel_constraint=None, bias_constraint=None)

Increasing the side is very similar to pooling. In fact you can represent pooling by the convolutional layers

@MartinThoma where in my answer did I say that stride is not similar to pooling?


text:
Does inflation should occur in output layer when I do Artificial Neural Network to increase smartness of the model?
The idea that come to my mind is called Value Based Model for ANN. We use simple DCF formula to calculate kind of Q value: Rewards/Discount rate. Discount rate is a risk of getting the reward on the information that agent know about. Of course if you have many factors you just sum that. So, we calculate FV for every cell that agent know information about and this is a predicted data. We put predicted - actual and teach model how to run using loss function. Rephrased, does increase in output layer actually train the model to be better? The human logic is that if I took course I have a bigger value that helps me to live. What about NN? Does it actually more precise if we with time increase output?


text:
Mapping Actions to the Output Layer in Keras Model for a Board Game
I have created a game based on this game here. I am attempting to use Deep Q Learning to do this, and this is my first foray into Neural networks (please be gentle!!)
I am trying to create a NN that can play this game. Here are some relevant facts about the game:

Player 1 (the fox) has 1 piece that he can move diagonally 1 step in any direction
Player 2(The geese) has 4 pieces that they can move only forward diagonally (either diagonal left or diagonal right) 1 step.
The Fox wins if he reaches the other end of the board, the geese win if they trap the fox so it cannot move.

I am trying to work on the agent first for the geese as it seems to be the harder agent with more pieces and restrictions. Here is the important sections of code I have so far:

This is where I setup the game board, and set the total actions for the geese

def __init__(self):
    self.state_size = (LENGTH,LENGTH) ##LENGTH is 8 so (8,8)
    #...
    #other DQN variables that aren't important to question
    #...
    self.action_size = 8 ##4 geese, each can potentially make 2 moves
    self.model = self.build_model()

And here is where I create my model

def build_model(self):
    #builds the NN for Deep-Q Model
    model = Sequential() #establishes a feed forward NN
    model.add(Dense(64,input_shape = (LENGTH,), activation='relu'))
    model.add(Dense(64, activation='relu'))
    model.add(Dense(self.action_size, activation = 'linear'))
    model.compile(loss='mse', optimizer='Adam')

This is where I perform an action

def act(self, state,env):
    #get the list of allowed actions for the geese
    actions_allowed = env.allowed_actions_geese_agent()

    if np.random.rand(0,1) <= self.epsilon: ##do a random move
        return actions_allowed[random.randint(0, len(actions_allowed)-1)]
    act_values = self.model.predict(state)
    print(act_values)
    return np.argmax(act_values)

My question: Since there are 4 geese and each can make 2 possible moves, am I correct in thinking that my action_size should be 8 (2 for each goose) or should it be maybe 2 (for diagonal left or right) or something else entirely?

The reason why I am at a loss is because on any given turn, some of the geese may have an invalid move, does that matter?

My next Question: Even if I have the right output layer for the geese agent, when I call model.predict(state) where I pick my action...how do I interpret the output? And how would I map that action it selects to a valid action that can be made?

Here is a picture of the result of using model.predict(state), as you can see it returns a ton of data and then when I call return np.argmax(act_values) I get 59 back...not sure how to utilize that (or if it's even correct based on my output layer)... and finally I included a drawing of the board. F is the fox and 1,2,3,4 are the different geese.

I apologize for the massive post, but I am just trying to provide as much information that is helpful.


text:
Why would giving my AI more data make it perform worse?
So I trained an AI to generate shakespeare, which it did somewhat well. I used this 10,000 character sample.
Next I tried to get it to generate limericks using these 100,000 limericks. It generated garbage output.
When I limited it to 10,000 characters, it then started giving reasonable limerick output.
How could this happen? I thought more data was always better.
The AI was a neural network with some LSTM layers, implemented in keras.

Maybe give the architecture of your LSTM, plus short samples of what you consider "garbage" and "reasonable limerick output". Also the losses or learning curves or other training logs might be useful to help with analysis.

Why would giving my AI more data make it perform worse?

A lot of possible reasons:

In forecasting, you could have a seasonality. If you have it exactly 3 times, then it is good. If you have it 3.5 times, it becomes worse because it overfits on the months which occur more often than the others.
Data quality: In practice, improving the quality of data often yields better results (see Analysis and Optimization of Convolutional Neural Network Architectures, page 15 (Analysis Techniques) for 7 approaches to improve your results)
Instable training / bad luck: some architectures / problems are super instable. You can execute the randomly initialized training 5 times and get vastly different results.


text:
Add training data to YOLO post-training
(Cross-posting here from the data science stack exchange, as my question didn't get any replies. I hope it's okay!)
I've been playing around with YOLOv3 and obtaining some good results on the ~20 custom classes I trained. However, one or two classes look like they can use some additional training data (not a lot, say about 10% more data), which I can provide.
What is the most efficient way to train my model now? Do I need to start training from scratch? Can I just throw in my additional data (with the appropriate changes to the config files etc.) and run the training based on the weight matrix I already acquired, but for a small number of iterations? (1000?) Or is this more like a transfer learning problem now?
Thanks for all tips!

Assuming that you do have a dataset (images + labels/bounding boxes) in a format that's required by the training model, you can fine-tune your existing model. You can choose to unlock the final few layers or leave all the layers unlocked during the training process. When I had performed such an experiment with RetinaNet I chose to unlock final few conv layers and was able to achieve slightly higher accuracy.


text:
Structure of a multilayered LSTM neural network?
I implemented a LSTM neural network in Pytorch. It worked but I want to know if it worked the way I guessed how it worked.
Say there's a 2-layer LSTM network with 10 units in each layer.
The inputs are some sequence data Xt1, Xt2, Xt3, Xt4, Xt5.
So when the inputs are entered into the network, Xt1 will be thrown into the network first and be connected to every unit in the first layer. And it will generate 10 hidden states/10 memory cell values/10 outputs. Then the 10 hidden states, 10 memory cell values and Xt2 will be connected to the 10 units again, and generate another 10 hidden states/10 memory cell values/10 outputs and so on.
After all 5 Xt's are entered into the network, the 10 outputs from Xt5 from the first layer are then used as the inputs for the second layer. The other outputs from Xt1 to Xt4 are not used. And the the 10 outputs will be entered into the second layer one by one again. So the first from the 10 will be connected to every unit in the second layer and generate 10 hidden states/10 memory cell values/10 outputs. The 10 memory cell values/10 hidden states and the second value from the 10 will be connected and so forth?
After all these are done, only the final 10 outputs from the layer 2 will be used. Is this how the LSTM network works? Thanks.

Welcome to Ai,can you please go through community guidelines.For your own benefit and to us as well.


text:
What are the advantages and disadvantages of using LISP for constraint satisfaction in 3D space
We are currently working on developing a 3D modeling software that allows designers to set spatial constraints to models. The computer then should generate a 3D mesh conforming to these constraints.
Why should or shouldn't we use Lisp for the constraint satisfaction part? Will Prolog environment be any better? Or should we stick to C/C++ libraries?
One requirement we have is that we want to use the Unity Game Engine as it has a lot of 3D tools built in

Do you like lisp? Or do you have knowledge about lisp? That's the reason why you should or not use it. Use tools you know. Or you can invest your time to learn different tools, but if you are able to use your old, why should you?

This is actually a question which will only receive opinion based answer's. A question you should ask yourself is if the constraint part is really that complex that it is worth to use a different programming language. Unity itself offers a C# API [1] and I would therefore stick with that.
[1] https://unity3d.com/programming-in-unity


text:
NEAT + Keras : reproducibility problem (World Models implementation)
I'm trying to apply the World Models architecture to the Sonic game (using the gym-retro library).
My problem concerns the evolutionnary algorithm part that I use as the controller (worldmodels = auto encoder + RNN + controller).
I'm using a genetic algorithm called NEAT (I use the neat-python library). I am searching for someone who can help me with the neat-python implementation.
Here is the method that runs a generation :
python
    best_genome = pop.run(popEvaluator.evaluate_genomes, 1)

Currently, all the individuals of the population are evaluated on the first level of Sonic The HedgeHog.
The "run" method should return the best genome of the population based on their performance on this level.
Then, I use this best genome to re-create the associated neural network in order to run it in the same level.
I was expected to see the exact same run as the best individual, but this is not the case.
Sometimes it does, sometimes not.
There are not a lot of examples with NEAT and I based my code on this one from the official documentation.
Here is my own implementation, if you want to check.
If anybody has already used NEAT, help would be welcome !


text:
Pre priming a network for white space
When a human looks at a page. He notices the sets of letters are grouped together separated by white space. If the white space was replaced by another character say z, it would be harder to distinguish words.
For a neural network, spaces are "just another character". How can we set up an RNN so it gives special importance to the difference between certain characters like white spaces and letters so that it will train faster? Assume the input is just a sequence of ASCII characters.


text:
People Counting Video Analytics: data acquisition parameters
I am interested in understanding how to choose data-acquisition parameters for the subject matter:

Frame Resolution
Frame rates (FPS)

The goal is to have 'enough' (preferably the minimal) resolution and frames to enable AI to identify people.
QUESTIONS

Are there any published rules of thumb or processes to select video parameters?
Is there a term or label for the selection of video parameters for AI projects?


text:
Maxpooling in inception?
Maxpooling is performed as one of the steps in inception which yields same output dimension as that of the input.
Can anyone explain how this max pooling is performed?

My bad, didn't look into the block diagram first

maxpooling filter/kernel is 3x3 = fxf
Formula for padding to get the same dimension as the input
p = (f - 1)/2
here f=3 ,so padding to be performed before maxpooling is (3-1)/2 = 1