LM317, basic voltage regulator, why does it get hot when not connected?
Obviously it's not working fine, so you can't say it's working fine without the caps.  The missing caps may be exactly the problem.  The regulator is probably oscillating at a high frequency without the caps there.

The values on that schematic are also not a good idea.  Put a 1-10 &micro;F ceramic cap immediately on the input and output of the regulator.  Keep those connections as short as possible.  Then you can add a larger bulk electrolytic to the input if you wish.  The 100 nF this schematic shows on the input is very skimpy.  10 &micro;F on the output may be OK, but it needs to be a low ESR type, not a electrolytic.