可以同时运行的两个流程共享变量吗?

发布于 2025-01-28 05:54:52 字数 255 浏览 4 评论 0原文

新手在这里,我侦察这可能是一个非常愚蠢的问题。我在两个不同的过程中同时在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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

丢了幸福的猪 2025-02-04 05:54:52

每个过程都是完全与另一个过程隔离的,或者有什么方法是,通过在另一个过程之后运行一个过程,我将覆盖我的变量,例如我的变量x,与数据集#1的功能矢量有关启动过程2后,第一个过程中的模型将被数据集#2的功能向量覆盖,从而影响我的第一个过程的模型的预测?

这些过程彼此隔离。一个过程不会覆盖另一个恰好具有相同“名称”的过程中的变量。

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?

The processes are isolated from each other. One process will not overwrite variables in another process that happen to have the same "name".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文