      figure = stack_images( figure )
  
      figure = numpy.clip( figure * 255, 0, 255 ).astype('uint8')
  
      cv2.imshow( '', figure )
      # If run from Docker, imshow won't work. Use:
      # cv2.imwrite( '_sample.jpg', figure )
  
  images_A = get_image_paths( 'data/trump' )
  images_B = get_image_paths( 'data/cage'  )
  images_A = load_images( images_A ) / 255.0
  images_B = load_images( images_B ) / 255.0
 
</s> remove     return [ x.path for x in os.scandir( directory ) if x.name.endswith(".jpg") or x.name.endswith(".png") ]
 </s> add     return [ x.path for x in scandir( directory ) if x.name.endswith('.jpg') or x.name.endswith('.png') ]

    cv2.imwrite( '_sample.jpg', figure )

      figure = stack_images( figure )
  
      figure = numpy.clip( figure * 255, 0, 255 ).astype('uint8')
  
    cv2.imwrite( '_sample.jpg', figure )
    cv2.imwrite( '_sample.jpg', figure )
    cv2.imwrite( '_sample.jpg', figure )
  
  images_A = get_image_paths( 'data/trump' )
  images_B = get_image_paths( 'data/cage'  )
  images_A = load_images( images_A ) / 255.0
  images_B = load_images( images_B ) / 255.0
keep keep keep keep replace replace replace keep keep keep keep keep
 Patch to better work with the dockerfile
Can be reverted if you improve Dockerfile 
train.py