Hi I am trying to simulate the flow of water through a porous medium using ANNs. I have managed to get good result when the porous medium is homogeneous, however when it isn't the network seems to struggle to capture sharp changes in the water flow.  In the example below a change in the porous medium properties lead to a "kink" in the test data (obtain using standard numerical techniques in my field) which cannot be captured by my simple neural network.  The neural network has 2 inputs a distance x and a time t, 2 hidden layer with 7 neurons, and an output layer with 1 neuron. The weights and biases are randomly initialized between -1 and 1. I tried increasing the number of neurons in the hidden layer up to 80 without getting any better.  I was wondering what the next step should be, should I add more training data from around the boundaries of the kinked areas ? Should I add a few more hidden layers to my network ?      Thanks !
I'm training a neural network but the training loss doesn't decrease. How can I fix this?  I'm not asking about overfitting or regularization. I'm asking about how to solve the problem where my network's performance doesn't improve on the training set.    This question is intentionally general so that other questions about how to train a neural network can be closed as a duplicate of this one, with the attitude that "if you give a man a fish you feed him for a day, but if you teach a man to fish, you can feed him for the rest of his life." See this Meta thread for a discussion:   If your neural network does not generalize well, see:
I tried to install ffmpeg in trusty/Ubuntu 14.04 and got the following message:  $sudo apt-get install ffmpeg  Reading package lists... Done Building dependency tree        Reading state information... Done Package ffmpeg is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'ffmpeg' has no installation candidate   Why isn't the package available? According to the official sources, is the radioactive green crystal that serves as Superman's Achilles' heel actually composed of the noble gas krypton, or is it supposed to be made out of some other substance? If so, what is that substance? error in count script for number of occurences Every irreducible polynomial $f$ over a perfect field $F$ is separable.   Can you check my proof? Assume that $f$ is irreducible but inseparable. So we have $f=\sum_i h_ix^i$ and $f^p=\sum_i h_i^px^{ip}$. Now I use Frobenius mapping $\phi (f)=f^p=(\sum_i h_ix^i)^p=\sum_i h_i^px^{ip}$ so it is reducible. Contradiction. Should I also show for char(F)=0? Detailed Bathymetric/Bathymetry contour data (0-200M) In Peter Jackson's film The Fellowship of the Ring, when the Council of Elrond takes place it shows a total of 22 members:    We all know the names of the ones who were part of the Fellowship, but I want to know who are the rest of the people in the council. Who are the elves that came with Legolas? The men next to the dwarves? The three old men sitting next to Boromir? Or the two elves next to Aragorn?  Starting from left to right:   Frodo Gandalf Elf Elf Legolas Elf Old Man Old Man Dwalin Gloin Gimli Nori Old Man Boromir Old Man Old Man Elf Elf Aragorn Elladan Elrond Elrohir How can angular velocity be constant even when there is a torque by friction? A cylinder at rest lying on a rough ground is given an impulse which imparts a translational velocity (no angular velocity) to it. The question goes ahead with finding time after which rolling starts etc. etc.  But I have another question: The friction from the ground will decrease the translational velocity but increase the angular velocity (as the torque of friction will be in the direction of rolling). After some time, the translational velocity will become equal to angular velocity and hence pure rolling will start.  After this time work done by friction will be 0 as the point of contact is not moving and hence translational velocity will be constant. Now my doubt is that, when translational velocity is constant, it implies angular velocity will also be constant (as translational velocity is a multiple of angular velocity). But the torque from friction (about the centre of mass) will not be zero which means angular velocity will not be constant. In some book where there was the same problem it was written friction will vanish. How can friction vanish? How can anguluar velocity be constant even when there is a torque by friction? Negative probabilities in quantum physics Office 2016 Advanced Setup I just started the Office 2016 Setup/Installation on my Windows 10 PC. The installation worked fine and started automatically showing only this dialog:    But there are no additional settings possible! I need to choose which programs I want to install and also add additional tools that are often missing when doing a default installation.  How can I change the Office Installation Settings?   Choose programs to install Add/Remove Office Tools (Maybe) Office installation directory   When I check after the installation in the the windows settings, the Office can only be uninstalled - no modifications available: format date in c# How can I format a date as dd/mm/yyyy or mm/dd/yy ?   Like in VB format("dd/mm/yy",now)  How can I do this in C#? An init-script does not get called on shutdown I have set up an init-script to control the state of a VirtualBox VM:  #!/bin/sh #chkconfig: 35 99 5 #description: vTiger virtual machine  ### BEGIN INIT INFO # Provides: vtigervm # Required-Start: $local_fs # Requider-Stop: $stop_fs # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: Manage vTiger virtual machine # Description: Utility to start and stop vTiger virtual machine on VirtualBox ### END INIT INFO  start() {     echo -n "Starting vTiger"     echo     su myuser -c '/usr/bin/VBoxManage startvm "vTiger" --type headless'     echo "Started virtual machine" &gt;&gt; /var/log/messages }  stop() {     echo -n "Shutting vTiger down..."     echo     su myuser-c '/usr/bin/VBoxManage controlvm "vTiger" acpipowerbutton'     while [ ! -z "`su - juhani -c '/usr/bin/VBoxManage list runningvms | grep vTiger'`" ]; do         echo -n "."         sleep 1     done     echo "Done."     echo "Stopped virtual machine" &gt;&gt; /var/log/messages }  status() {     echo -n "Running VMs: "     su myuser -c '/usr/bin/VBoxManage list runningvms'     echo     if [ -z "`su - juhani -c '/usr/bin/VBoxManage list runningvms | grep vTiger'`" ]; then         RETVAL=3         else         RETVAL=0     fi     echo "Queried virtual machine status" &gt;&gt; /var/log/messages }  echo "Called virtual machine management script with: $1" &gt;&gt; /var/log/messages case "$1" in   start)         start    ;;    stop)         stop    ;;    restart|try-restart|condrestart|reload)         stop         start    ;;    status)         status    ;;    *)         echo $"Usage: $0 {start|stop|restart|status}"         exit 1    ;; esac  exit $RETVAL   The system is CentOS 6.5. If I manually run service [start|stop|status] vtigervm, it works as I expect it to. If the VM is running, $? after the service vtigervm status returns 0, and 3 if it is stopped. I installed it with chkconfig and it created among a few others rc5.d/S99vtigervm and rc0.d/K05vtigervm.  The problem  When I start the system it starts the "service", but on shutdown it does not even run the scripts.  grep "virtual machine" /var/log/messages shows:  *[machine starting]* Called virtual machine management script with: start Started virtual machine *[shutdown -h now]* *[machine stopped]*   What I expect:  *[machine starting]* Called virtual machine management script with: start Started virtual machine  *[shutdown -h now]* Called virtual machine management script with: status Queried virtual machine status Called virtual machine management script with: stop Stopped virtual machine *[machine stopped]*   File permissions &amp; etc:  # ls -lah /etc/rc0.d/ lrwxrwxrwx. 1 root root 13 7.2. 17:49 /etc/rc0.d/K05atd -&gt; ../initd.d/atd lrwxrwxrwx. 1 root root 18 9.2. 00:06 /etc/rc0.d/K05vtigervm -&gt; ../initd.d/vtigervm Bash : compare two strings with space I am trying to write a bash script which run a command and compare the result with another string.   #!/bin/bash -x  STATUS=`/root/setup_ha show --password-file=/root/password | grep "&gt;HA State" | awk '{print $3}' |  cut -c 2-`  TEST=`echo $STATUS` if [[ "$TEST" == "ON Master" ]]; then echo CLUSTER CRITICAL else   echo CLUSTER OK MASTER fi   As the Original string is on two lines, I echo it in a new variable TEST. The New variable have the output of the command on one line.  Here is the Bash debug output :  ++ /root/setup_ha show --password-file=/root/password ++ grep '&gt;HA State' ++ awk '{print $3}' ++ cut -c 2- + STATUS='ON Master' ++ echo 'ON' Master + TEST='ON Master' + [[ ON Master == \O\N\ \M\a\s\t\e\r ]] + echo CLUSTER OK MASTER CLUSTER OK MASTER   I also tried the following test :  if [[ "$TEST" =~ "ON Master" ]]   The thing is bash is not able to compare the strings it is always false.  Any idea ?   EDIT :  Here is the output with the first answer :  + STATUS='ON Master' ++ echo 'ON' Master + TEST='ON Master' + '[' 'ON Master' == 'ON Master' ']' + echo CLUSTER OK MASTER CLUSTER OK MASTER   Still  not working ON seems weird on line 3, plus in my bash it takes green color ! Merge some tab-delimited files Squeezing all the SEO out of a URL as possible I am working on an ecommerce site, I told our SEO consultant that I plan to make the URL scheme: /products/&lt;id&gt;/&lt;name&gt;. This is similar to Stackoverflow's URLs which are /questions/&lt;id&gt;/&lt;title&gt;.  He asked me if I could change the URL scheme to /p/&lt;id&gt;/&lt;name&gt; instead. I know why he wants this change, the word "products" isn't needed to find the correct product, and it doesn't offer any SEO, so shortening it to just p would make the relevant keywords in the &lt;name&gt; weigh more.  His main priority is maximizing SEO, but the part that I don't think he is considering is how this effects the semantics of the site. Also having the word "products" looks like it has meaning and a reason for being there, just having a p looks chaotic and ugly to me. I also don't think it makes that much of a difference does it? Stackoverflow doesn't use /q/&lt;id&gt;/&lt;title&gt; and they do just fine, I do realize that theres many factors at play here though, not just the URL.  So I want some outside opinions on which is the better way and why? Commas with "so" I am confused with the usage of so.  Consider some examples from Oxford and Meriam-webster        It was still painful so I went to see a doctor (Oxford).   We were bored with the movie, so we left (MW).   There are no more chairs available, so you'll have to stand (MW).      So is a conjunction in all the above sentences. But I don't understand when to place a comma before it. So is one of FANBOYS. Thus, we have use a comma when it connects two independent clauses, which I think contradict the first sentence.  Is the placement of comma before so depends on a style guide? For example, Americans prefer a comma while the British doesn't. How do I suspend a whole process (like the Process Explorer does when I click Suspend) in C#.  I'm starting the Process with Process.Start, and on a certain event, I want to suspend the process to be able to do some investigation on a "snapshot" of it. False proof that $ρe^{iθ} = ρ$ and so complex numbers do not exist? My professor showed the following false proof, which showed that complex numbers do not exist. We were told to find the point where an incorrect step was taken, but I could not find it. Here is the proof: (Complex numbers are of the form $\rho e^{i\theta}$, so the proof begins there) $$\large\rho e^{i\theta} = \rho e^{\frac{2 \pi i \theta}{2\pi}} = \rho (e^{2\pi i})^{\frac{\theta}{2\pi}} = \rho (1)^{\frac{\theta}{2\pi}} = \rho$$ $$Note: e^{i\pi} = -1, e^{2\pi i} = (-1)^2 = 1$$ Since we started with the general form of a complex number and simplified it to a real number (namely, $\rho$), the proof can claim that only real numbers exist and complex numbers do not. My suspicion is that the error occurs in step $4$ to $5$ , but I am not sure if that really is the case. When a 0-1-matrix with exactly two 1’s on each column and on each row is non-degenerated? [1] Let $A$ be an $n\times n$ matrix with entries in the set $\{0,1\}$ which has exactly two ones in each column and two ones in each row.  Give necessary and sufficient conditions for the rank of $A$ to be $n$. When two phrases are pronounced alike but have different spelling and meaning, can we call them homophones?  e.g. "ice-cream" and "I scream", "nitrate" and "night rate", "that's tough" and "that stuff".  Or is there another term for them?  What linguistic phenomenon distiguishes these near homophones?  I've checked the putative duplicate at  but it isn't exactly what I'm asking here. Difference between var = {} and var = []?