G-SemTMO: Tone Mapping with a Trainable Semantic Graph