我试图在GoogleColab和GPU运行时中使用以下代码获取StyleGAN生成器常量层的值
v1 = (tflib.run(['G_synthesis_1/4x4/Const/const:0'])[0])
但我得到了以下错误:
> InvalidArgumentError: Cannot place the graph because a reference or
> resource edge connects colocation groups with incompatible assigned
> devices: /job:localhost/replica:0/task:0/device:GPU:0 vs
> /job:localhost/replica:0/task:0/device:CPU:0. The edge src node is
> G_synthesis_1/4x4/Const/const , and the dst node is
> _retval_G_synthesis_1/4x4/Const/const_0_0
这是我正在尝试的参考代码replicate。笔记本的运行时类型设置为GPU,因此我假设代码将在其上运行。可以在Colab中运行它吗
目前没有回答
相关问题 更多 >
编程相关推荐