Block based learned image compression