Pytorch:处理多个功能和参数
我有大量的神经网络(这样我必须使用列表理解来产生它们),例如[f_1,f_2,f_3 ...],由 f 共同表示。
我有参数 x = [x_1,x_2,x_3 ...],因此输入张量x_i适用于网络f_i。由于数据,然后是梯度,我的张量很大。
是否有一种优雅的(且高效的)方法来获得序列[F_1(X_1),F_2(X_2),F_3(X_3)...]?
I have a large number of neural networks (such that I have to use list comprehension to produce them), say [f_1, f_2, f_3 ...], collectively denoted by F.
I have the argument X = [x_1, x_2, x_3 ...], such that input tensor x_i is intended for the network f_i. The tensors I have will be big, owing to the data and then the gradients.
Is there an elegant (and efficient) way of obtaining the sequence [f_1(x_1), f_2(x_2), f_3(x_3) ...]?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以再次使用列表理解:
You could again use a list comprehension: