weikunhan:

However, is it that possible to use " torch.cuda.stream" could be faster than without using it?


Yep, using multiple streams could be faster, if operators from one stream cannot fully utilize all computing resources on the GPU. To check if it is the case for your application, you can measure the total execution time using either CUDA events elapsed_time or torch.cuda.synchronize() with time.time().
However, in your second forward  function, there are potential unsafe usage of streams. The line below consumes the value of superpixels on the default stream, but the preceding assignment superpixels = self.spixelnet(images) was on stream1. In this case, its possible that the default stream reads superpixels before stream1 writes it.
convert_xy(superpixels, self.imsize[0], self.imsize[1])

The same thing also applies to x. You can use wait_stream to synchronize streams.