Photonic Tensor Machine and Multi-level Encoding and Decoding in Wavelength-Multiplexed Photonic Processors