Yi_Liu:

torch:: from_blob, it runs fast but will be wrong after return as the pointer’s data has been released


The options here seem to be to either hold on to the data or to use from_blob(...).clone().
Best regards
Thomas