artificial-intelligence

XOR problem solvable with 2x2x1 neural network without bias?

▼魔方 西西 提交于 2019-12-18 06:09:54
问题 Is a Neural network with 2 input nodes, 2 hidden nodes and an output supposed to be able to solve the XOR problem provided there is no bias? Or can it get stuck? 回答1: Leave the bias in. It doesn't see the values of your inputs. In terms of a one-to-one analogy, I like to think of the bias as the offsetting c -value in the straight line equation: y = mx + c ; it adds an independent degree of freedom to your system that is not influenced by the inputs to your network. 回答2: If I remember

Ranking Selection in Genetic Algorithm code

心不动则不痛 提交于 2019-12-18 03:44:35
问题 I need code for the ranking selection method on a genetic algorithm. I have create roulette and tournament selections method but now I need ranking and I am stuck. My roulette code is here (I am using atom struct for genetic atoms) : const int roulette (const atom *f) { int i; double sum, sumrnd; sum = 0; for (i = 0; i < N; i++) sum += f[i].fitness + OFFSET; sumrnd = rnd () * sum; sum = 0; for (i = 0; i < N; i++) { sum += f[i].fitness + OFFSET; if (sum > sumrnd) break; } return i; } Where

Finding meaningful sub-sentences from a sentence

一个人想着一个人 提交于 2019-12-17 22:35:10
问题 Is there a way to to find all the sub-sentences of a sentence that still are meaningful and contain at least one subject, verb, and a predicate/object? For example, if we have a sentence like "I am going to do a seminar on NLP at SXSW in Austin next month". We can extract the following meaningful sub-sentences from this sentence: "I am going to do a seminar", "I am going to do a seminar on NLP", "I am going to do a seminar on NLP at SXSW", "I am going to do a seminar at SXSW", "I am going to

How to get Tensorflow tensor dimensions (shape) as int values?

断了今生、忘了曾经 提交于 2019-12-17 22:33:33
问题 Suppose I have a Tensorflow tensor. How do I get the dimensions (shape) of the tensor as integer values? I know there are two methods, tensor.get_shape() and tf.shape(tensor) , but I can't get the shape values as integer int32 values. For example, below I've created a 2-D tensor, and I need to get the number of rows and columns as int32 so that I can call reshape() to create a tensor of shape (num_rows * num_cols, 1) . However, the method tensor.get_shape() returns values as Dimension type,

What is fuzzy logic?

删除回忆录丶 提交于 2019-12-17 21:44:27
问题 I'm working with a couple of AI algorithms at school and I find people use the words Fuzzy Logic to explain any situation that they can solve with a couple of cases. When I go back to the books I just read about how instead of a state going from On to Off it's a diagonal line and something can be in both states but in different "levels". I've read the wikipedia entry and a couple of tutorials and even programmed stuff that "uses fuzzy logic" (an edge detector and a 1-wheel self-controlled

Random Numbers in Unity3D?

丶灬走出姿态 提交于 2019-12-17 21:30:50
问题 What I found was how to create random numbers. Great. This solution, however, was not working in other functions. To create a random number, I used Random randomDirection = new Random(); int directionChoice = randomDirection.Next(1, 4); inside of a function called enemyWalk(){}; However, this caused an error: Type 'UnityEngine.Random' does not contain a definition for 'Next' and no extension method 'Next' of type 'UnityEngine.Random' could be found (are you missing a using directive or an

What is the difference between a feature and a label?

◇◆丶佛笑我妖孽 提交于 2019-12-17 21:27:25
问题 I'm following a tutorial about machine learning basics and there is mentioned that something can be a feature or a label . From what I know, a feature is a property of data that is being used. I can't figure out what the label is, I know the meaning of the word, but I want to know what it means in the context of machine learning. 回答1: Briefly, feature is input; label is output. This applies to both classification and regression problems. A feature is one column of the data in your input set.

Keras plot_model not showing the input layer appropriately

寵の児 提交于 2019-12-17 20:35:16
问题 My model is defined as such: model = keras.models.Sequential() model.add(layers.Embedding(max_features, 128, input_length=max_len, input_shape=(max_len,), name='embed')) model.add(layers.Conv1D(32, 7, activation='relu')) model.add(layers.MaxPooling1D(5)) model.add(layers.Conv1D(32, 7, activation='relu')) model.add(layers.GlobalMaxPooling1D()) model.add(layers.Dense(1)) and when I use the plot_model function to draw it out: from keras.utils import plot_model plot_model(model, show_shapes=True,

Which language should I use?

喜夏-厌秋 提交于 2019-12-17 19:53:54
问题 I'm about to produce a prototype for a technology startup that I've just joined, and I'm trying to decide which language to use. It's going to be a simple web tool with a MySQL database in the background and some AI stuff going on in between. I've used Ruby and PHP a reasonable amount in the past, but wonder whether I might be better off going with Python or even Perl. My main programming experience is with C / C++ / Java, but I feel like I want to go for something that will make my life as

How does a back-propagation training algorithm work?

瘦欲@ 提交于 2019-12-17 18:03:34
问题 I've been trying to learn how back-propagation works with neural networks, but yet to find a good explanation from a less technical aspect. How does back-propagation work? How does it learn from a training dataset provided? I will have to code this, but until then I need to gain a stronger understanding of it. 回答1: Back-propagation works in a logic very similar to that of feed-forward . The difference is the direction of data flow. In the feed-forward step, you have the inputs and the output