Algorithm1: Haarwavelettransformationpseudocode,PyTorch-like