So I'm doing the tensorflow tutorial found here:    Basically, my input is a [28x28] matrix (image) that I flatten to a [1x784] vector.  The tutorial then says:     We scale these values to a range of 0 to 1 before feeding to the neural network model. For this, cast the datatype of the image components from an integer to a float, and divide by 255.   My question is why do we need to normalize in this case? My understanding is that when we have features that are on different scales, we need normalization if not the output of the model is distorted. But in this case all pixel ranges go from 0 to 255 (all features are the same scale)  I went ahead and ran it with normalization, and get an accuracy of over 85%, whereas no normalization, my accuracy falls to 10%.  Any ideas?
I'm quite new to neural networks and currently I'm trying to train a non convolutional neural network on the MNIST data set. I'm observing some behaviour I don't quite understand.   This is the code written with keras as the library:  # the data, split between train and test sets (x_train, y_train), (x_test, y_test) = fashion_mnist.load_data()  y_train = keras.utils.to_categorical(y_train, 10) y_test = keras.utils.to_categorical(y_test, 10) model = Sequential()  early_stopper = EarlyStopping(patience=3)  model.add(Flatten(input_shape=(28,28))) model.add(Dense(128, activation="relu")) model.add(Dense(128, activation="relu")) model.add(Dense(10, activation="softmax")) model.compile(loss="categorical_crossentropy", optimizer="adam", metrics=["accuracy"])  model.fit(x_train, y_train, epochs=20, validation_data=(x_test, y_test), callbacks=[early_stopper])   This gives me a validation_acc of around 20%. The funny thing is, when I change the activation functions to "sigmoid", the loss function to "mean_squared_error" and the optimizer to "sgd" my performance improves to around 85% after 50 epochs.   Having read  I wonder what's the reason for the bad performance of the network I presented in the code. ReLU, cross-entropy and a dynamic optimizer like Adam all seem to improve on the idea of a very vanilla neural network with stochastic gradient optimization, mean squared error as loss and sigmoid activation functions. Yet I get a really bad performance and if I increase the number of nodes in the hidden layers I often get a network that doesn't learn at all.   EDIT: I figured out it has something to do with me not normalizing the input to values between 0 and 1 ... but why is this the problem?
Are there areas of mathematics (current or future) that cannot be formalized in set theory? I often read that ZFC can formalize "most" of everyday mathematics, but I could never find an example which it cannot. The closest I got is differential geometry (DF), where some article mentions that the translation from concepts of DF into set theory would render it almost "meaningless", in the sense that any intuitions one could have would be lost in the translation. So, if I didn't misunderstand, at least in theory, the translation could be done, so that a future AI machine could prove theorems of differential geometry using set theory. On the other hand, the Stanford Encyclopedia of  Philosophy states that "all of mathematics can be reduced to a formal system of set theory"().   So, the questions are:    Is there any current area of mathematics that could be not formalized within set theory? If so, which ones? and  Is there any reason to think that every math of the future will be always formalizable in set theory? any references to read on the subject are welcomed!   Clarification: by set theory I am not restricting to ZFC, but to any flavor of it, including all additional axioms you want (about large cardinals or any kind) I installed Ubuntu 15.04 on the VM and I have downloaded Eclipse Luna. When I try to install it, this error occurs:      An error has occurred.   See the log file   /home/master/.eclipse/1473617060_linux_gtk_x86_64/configuration/1442224462970.log   Can you help me to fix  it? Thanks I've asked several questions about 4th Edition D&amp;D because I may be able to start a game. However, I'd need to purchase (some) materials. I am aware of the 4 book set (core) and the expected Essentials Red Box.  So now I need to know: presumably buying either the 4 book set or essentials will be enough to get my game on. Would there be something 'lacking' though? Would I be missing character types, for instance, as I've seen that the splatbook strategy is still in effect?  I'm an experienced player and GM and plenty creative, so many holes I'd be able to fill in myself. I just don't want to get sucked into too much financial impact. Game State 'Stack'? I was thinking about how to implement game states into my game. The main things I want for it are:   Semi-transparent top states-being able to see through a pause menu to the game behind Something OO-I find this easier to use and understand the theory behind, as well as keeping orgranised and adding more to.    I was planning on using a linked list, and treat it as a stack. This means I could access the state below for the semi-transparency.  Plan: Have the state stack be a linked list of pointers to IGameStates. The top state handles its own update and input commands, and then has a member isTransparent to decide whether the state underneath should be drawn.  Then I could do:  states.push_back(new MainMenuState()); states.push_back(new OptionsMenuState()); states.pop_front();   To represent the player loading, then going to options, and then main menu.  Is this a good idea, or...? Should I look at something else?   Thanks. What is the name of this kind of character illustration? jQuery document.createElement equivalent? Why does a delta/wye transformer make 30 degrees phase shift ? I'v heard that a delta/delta or Wye/Wye transformers do not make any phase shift. In delta/wye or wye/delta transformers, There is a 30 degrees phase shift between the primary and secondary coils. So, Why is  there a phase shift ? and Why is it 30 degrees ?.. Why not 60 or 120 ?  I googled and I found calculations with phasor diagrams that proves the 30 degrees phase but I'm confused because of too many calculations and diagrams, I didn't get it.  Would you give me a simple answer, please ? and I prefer the physical meanings and concepts rather than equations and mathematics.  Thank you very much, Say, teamA score is 368 (369 to win), and teamB is batting at 368 (or 366). One run (or 3 runs) will make them win. The batsman hits the ball for a six, so score is 374 (or 372) which is more than the required 369. Even then the runs are counted for the team and for the batsman.  Now, on the last ball, suppose the batsman did not hit a six, but ran for a single : teamB will win. Can the batsmen continue to run until the ball is dead ?  Why will they want this ? (A) If batsman is at 98 and wants to reach a century. (B) If batsman has a career total of 9998 and wants to reach 1000 runs. (C) If the batsman has a very high record strike rate, and wants to remain at that record strike rate. (D) In the championship, this is the last quarterfinal, &amp; even winning will put teamB equal to teamC, and the better runrate at the end of the quarterfinals will enable them to move to the semifinals. (E) Many similar situations can happen.  So coming back to the question : Do the laws of cricket allow running on the last ball, even after winning ?  In most of the matches I have seen, after winning, the batsmen do not even look where the ball is and start celebrating the win. If the rules did not allow them to run more, then fine. If the rules did allow it, then has there been any game where they did run more ? There were so many discussions about an Ubuntu with RR. They were so many pros and contras. At the end ubuntu wont be changed, the 6 month cycle system wont be changed. Thats fine!   But because there are so many people who would like to use an ubuntu with RR Im asking myself why isnt there an Ubuntu Derivate with RR. I couldnt found one, there are a loooot of Ubuntu Derivates but no RR. Is it just impossible? I mean Ubuntu = 6 months cycle, so the derivate have to be a 6 month cycle too? Is there no other option? Or are there already some smart guys trying to solve this problem? Thank you! Dual-boot boot menu does not show up after installing Ubuntu 15.10 alongside Windows 10 Why does part of my model disappear when I zoom in on it in the 3D Viewport? I'm having an odd issue - When I try to zoom in on a detail using my MMB, the "camera" in the 3D view seems to be cutting off the exterior surface of my object and showing me the inside instead. I'd expect this behavior, but only when I was much more zoomed in.  If I zoom out a bit (one click on the scroll wheel) then I can see the exterior as I intend.  Is there any way to adjust this behavior?  Thanks! Converse of Schur's Lemma in finite dimensional vector spaces I am trying to prove (or disprove) the converse of Schur's Lemma in finite dimensional vector spaces. I am not sure if it holds in this case, but I have tried to apply the idea that proves it in representation theory (see for example Theorem 4.3  that uses Maschke's theorem or in questions  and ).  The converse of Schur's Lemma in finite dimensional vector spaces is:     Let $V$ be a finite dimensional vector space over the complex numbers. Let $S$ be a set of endomorphisms of $V$ and assume that every endomorphism $A$ of $V$ such that $$AB=BA\text{ for all }B\in S$$ is of the form $\lambda I, \ \lambda\in\mathbb{C}$. Then $V$ is a simple $S$-space.   (*an endomorphism of $V$ is a linear operator from $V$ to $V$  *$V$ is a simple $S$-space if the only $S$-invariant subspaces of $V$ are $V$ itself and the zero subspace)  What I've tried so far:  Assume to the contrary that $V$ is not a simple $S-$space. Then, there exists a subspace $W$ of $V$ such that $W\not =\{0\}$, $W\not= V$ and $W$ is $S$-invariant. Let $W'=V\setminus W$. Then, since $V$ is finite, we can easily prove that $V=W\oplus W'$ (this is my attempt to translate Maschke's theorem in vector spaces). Consequently, for every $v\in V$, there exists unique $w\in W$ and $w'\in W'$, such that $v=w+w'$. Define the projection $P:V\rightarrow V$ by $Pv=w$ for every $v\in V$.   What is left to prove is that $PB=BP$ for all $B\in S$. Then $P$ is clearly not a scalar and thus we have the contradiction we are looking for.  There is a difficulty in showing that $PB=BP$ for all $B\in S$, because $W'$ might be $S$-invariant or not. More precisely:   Let $v\in V=W\oplus W'$ and $v\not =0_V$.  If $v\in W$ then $Bv\in W$ because $W$ is $S$-invariant, therefore: $PBv=Bv$ and $BPv=Bv$.  If $v\in W'$ then $Pv=0$, hence $BPv=B\cdot 0=0$, and  (i) if $Bv\in W'$ then $PBv=0$.  (ii) if $Bv\in W$ then $PBv=Bv$ and this is where the problem occurs.  Any hints, ideas or counterexamples would be very helpful. return statement vs exit() in main() Should I use exit() or just return statements in main()? Personally I favor the return statements because I feel it's like reading any other function and the flow control when I'm reading the code is smooth (in my opinion). And even if I want to refactor the main() function, having return seems like a better choice than exit().  Does exit() do anything special that return doesn't? When should I use "shall" versus "will"? Which is the correct use of these two words, and in which context should one be used rather than the other? Explain how (or if) a box full of photons would weigh more due to massless photons Sci-Fi Movie/Show Where a Soul is Captured in a Glass Vessel What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally? How can I prevent my mail from being classified as spam? When sending or forwarding emails using a personal or company domain using a  website or email client, how do I prevent the email from being incorrectly marked as spam? Moment generating function (MGF) of the ratio distribution $\displaystyle\frac{X}{Y}$ If we know the moment generating functions (MGFs) of the random variables $X$ and $Y$ to be $M_{X}(s)$ and $M_{Y}(s)$, respectively. The MGF of the sum $X+Y$ will $M_{X}(s) \cdot M_{Y}(s)$.  So what is the MGF of the ratio distribution $\displaystyle\frac{X}{Y}$? Using math in TikZ