Results 9 comments of itisl

[vue-faas](https://github.com/midwayjs/hooks/blob/main/examples/vue-faas) 示例项目

就是这个模板,换了好几个nodejs版本,windows和linux环境下都是这样

https://user-images.githubusercontent.com/32608524/174499929-5e477648-fc35-485d-810a-e5de7cf3da26.png

![image](https://user-images.githubusercontent.com/32608524/176997134-599f6ac2-a109-46f1-a271-20e8ff6cfa5f.png)

https://github.com/midwayjs/hooks/tree/main/examples/vue-faas

> > @L-jasmine 请问你的代码是不是不支持英文的? > > 对 支持英文的我这两天就更新上去。然后我会publish一个独立的库。希望大家可以一起维护 导出的模型在gpu运行有问题 Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!\n

> > > > @L-jasmine 请问你的代码是不是不支持英文的? > > > > > > > > > 对 支持英文的我这两天就更新上去。然后我会publish一个独立的库。希望大家可以一起维护 > > > > > > 导出的模型在gpu运行有问题 Expected all tensors to be on...

> > @L-jasmine export_torch_script.py里T2SModel里的forward在返回的时候是不是应该改成-idx:-1,把最后一个删掉。因为我推理的时候有时会报out of index,然后发现这里最后一个会是1024,导致embedding的时候越界。但我不知道怎么改最好,改成到-1至少没有报错。 > > y[0, -1] = 0 这样可以吗?我其实也不懂这些是啥东西,我只是抄别的部分的代码。我看 onnx_export.py 里面有这样一段 ![image](https://github.com/user-attachments/assets/6c66bf84-2fe2-4bf0-a785-fde1a2e30055) 确实没报错了,今天上午我也遇到上面的错误了,加上就好了

![image](https://github.com/user-attachments/assets/10286857-dc03-420d-977d-20a5a62f353e) 速度还行,不知道怎么优化,感觉还可以优化