Looking through that thread, they suggest replacing the MATLAB libstdc++ with the default one (by renaming it). I can’t find any libstdc++ for Matlab, locate libstdc++ lists nothing in a Matlab directory.
It still not work even I make my Matlab (I try in Matlab2016b and Matlab2018a) to use my system libstdc++.
Maybe problem is in 0.4. Pytorch 0.3 is work well with my Matlab and no need to change anything.
my environment:
Ubuntu16.04
Matlab2016b Matlab2018a
PyTorch 0.4
Python 2.7