The error message is:
RuntimeError: Expected 4-dimensional input for 4-dimensional weight 32 1, but got 2-dimensional input of size [32, 50176] instead

which doesn’t point towards an illegal memory access, but a shape mismatch.
Most likely you are trying to pass a 2-dimensional input to e.g. an nn.Conv2d layer, which expects an input in the shape [batch_size, channels, height, width].
Since this error is unrelated, feel free to create a new topic, if you get stuck.
PS: you can post code snippets by wrapping them into three backticks ```, which would make debugging easier.