A man who violently shook a five-week-old baby after he became frustrated at the child’s crying has learned his fate in court.