可以同时运行的两个流程共享变量吗?
新手在这里,我侦察这可能是一个非常愚蠢的问题。我在两个不同的过程中同时在CUDA上运行,这是一个简单的3层MLP神经网络,上面是两个不同的数据集。 由于这两个过程实际上使用相同的脚本,因此它们都在创建具有相同名称的变量,因此我的问题是:每个过程是否与另一个过程完全隔离,还是有任何方法是,通过在另一个过程中运行一个过程,我将要覆盖我的变量,例如我的变量x,与数据集#1的功能向量有关,我在第一个过程中给出的模型将被数据集#2的功能向量向量向量向量向量介绍,从而影响我的第一个过程的模型的模型预测?
Newbie here, I recon this may be a very foolish question. I am simultaneously running on cuda, in two distinct processes, a simple 3-layer MLP neural network over two different datasets.
Since these two processes are practically using the same script, they are both creating variables with the same names, so my question is: is each process completely isolated from the other, or is there any way that by running one process after the other I will be overwriting my variables, e.g. my variable x, pertaining to the dataset #1's feature vector I'm giving the model in the first process will be overwritten with the dataset #2's feature vector once I start process 2, therefore influencing my first process's model's predictions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这些过程彼此隔离。一个过程不会覆盖另一个恰好具有相同“名称”的过程中的变量。
The processes are isolated from each other. One process will not overwrite variables in another process that happen to have the same "name".