我正在尝试遵循here的指南,但它只是将模型保存为文件,而不是教程中概述的文件夹。代码: import segmentation_models as smfrom tensorflow import kerasimport tensorflow as tf
loss = sm.losses.binary_focal_dice_loss
由于未知的原因,下面的代码在GPU上比在CPU上慢两倍。有人能解释一下原因吗:import tensorflow as tf
with tf.device('/device:GPU:0'): # gpu takes: 5.132448434829712硬件:运行在谷歌Colab上的Tensorflow代码。在本地英特尔酷睿i5-7267U上运行的Numpy代码。以下是其中的更新代码和数据(运行泰坦XP卡/英特尔i7处理