Put the code in forward method solved this problem. 
def forward(self, x):
        ...
        pred = torch.argmax(outputs[0], 1)
        pred = pred.cpu().data
        predict = pred.squeeze(0)
        predict = predict.type(torch.FloatTensor)

        return predict

Run the traced_script and get a new model.pt, put it in assets, the output tensor will change and could be use directly.