【问题标题】:SimCLR, augmentation generates one images instead of twoSimCLR,增强生成一张图像而不是两张
【发布时间】:2021-09-11 16:57:35
【问题描述】:

我正在研究 SimCLR 的增强,我们必须从一张图像生成两个。但如果我绘制我的输出,它只显示一个图像。我不明白为什么

def augment_ops()
....
    return image
 def preprocess_image_train(image):
   
    image1 = augment_ops(image)
    image2 = augment_ops(image)

    return image1, image2
output = preprocess_image_train(img1)
plt.imshow(output)
plt.show()

【问题讨论】:

    标签: python unsupervised-learning data-augmentation


    【解决方案1】:

    你不应该调用这个函数吗,因为返回了两个图像,像这样:

    output1,output2 = preprocess_image_train(img1)
    

    然后分别显示?

    plt.imshow(output1)
    plt.show()
    
    plt.imshow(output2)
    plt.show()
    

    【讨论】:

      猜你喜欢
      • 2021-11-30
      • 2019-10-19
      • 2021-11-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多