Encoder Embedding for General Graph and Node Classification