Sunday, August 05, 2018

L2 regularization

Given the randomness in the data set, it is impossible to predict which regularization rate produced the best results for you. For us, a regularization rate of either 0.3 or 1 generally produced the lowest Test loss.

https://developers.google.com/machine-learning/crash-course/regularization-for-simplicity/playground-exercise-examining-l2-regularization

Friday, June 15, 2018

Machine Learning Crash Course from Google

Is There a Standard Heuristic for Model Tuning?

This is a commonly asked question. The short answer is that the effects of different hyperparameters are data dependent. So there are no hard-and-fast rules; you'll need to test on your data.
That said, here are a few rules of thumb that may help guide you:
  • Training error should steadily decrease, steeply at first, and should eventually plateau as training converges.
  • If the training has not converged, try running it for longer.
  • If the training error decreases too slowly, increasing the learning rate may help it decrease faster.
    • But sometimes the exact opposite may happen if the learning rate is too high.
  • If the training error varies wildly, try decreasing the learning rate.
    • Lower learning rate plus larger number of steps or larger batch size is often a good combination.
  • Very small batch sizes can also cause instability. First try larger values like 100 or 1000, and decrease until you see degradation.
Again, never go strictly by these rules of thumb, because the effects are data dependent. Always experiment and verify.

https://colab.research.google.com/notebooks/mlcc/first_steps_with_tensor_flow.ipynb

Sunday, April 15, 2018

Saturday, March 03, 2018

Manually set screen resolution for Ubuntu

install xrandr
$ sudo apt-get install xrandr

check current modes
$ xrandr
Screen 0: minimum 8 x 8, current 1360 x 768, maximum 32767 x 32767
DVI1 unknown connection 1360x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1360x768      59.80*+
VGA1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768      60.00*
   800x600       60.32    56.25 
   848x480       60.00 
   640x480       59.94

find new mode to add
$ cvt 1360 768
# 1360x768 59.80 Hz (CVT) hsync: 47.72 kHz; pclk: 84.50 MHz
Modeline "1360x768_59.80"   84.50  1360 1432 1568 1776  768 771 781 798 -hsync +vsync

add new mode
$ xrandr --newmode "1360x768_59.80" 84.50  1360 1432 1568 1776  768 771 781 798 -hsync +vsync

check new mode
$ xrandr
Screen 0: minimum 8 x 8, current 1360 x 768, maximum 32767 x 32767
DVI1 unknown connection 1360x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1360x768      59.80*+
VGA1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768      60.00*
   800x600       60.32    56.25 
   848x480       60.00 
   640x480       59.94 
   1360x768_59.80  59.62

set new mode
$ xrandr --output VGA1 --mode 1360x768_59.80 --auto