logo
Loading...

cifar_generator的labels - Cupoy

在第98天教材出現:def cifar_generator(image_array, batch_s...

ml100-2,ml100-2-d98

cifar_generator的labels

2019/08/04 下午 03:57
機器學習共學討論版
JS
觀看數:89
回答數:1
收藏數:0
ml100-2
ml100-2-d98

在第98天教材出現:


def cifar_generator(image_array, batch_size=32):
   
while True:
       
for indexs in range(0, len(image_array), batch_size):
           images
= x_train[indexs: indexs+batch_size]
           labels
= x_test[indexs: indexs+batch_size]
           
yield images, labels


想請問為什麼這邊的 labels 不是放 y_train[indexs: indexs+batch_size] 而是用 x_test[indexs: indexs+batch_size] 呢? 

回答列表

  • 2019/08/05 上午 00:37
    Jimmy
    贊同數:1
    不贊同數:0
    留言數:0

    Hi Js!


    謝謝你細心發現這個問題,這邊是我們程式碼撰寫錯誤,已經修正囉!再次感謝你幫我們找出這個勘誤:)