Özellikle bir ssd_mobilenet_v1 ağı oluşturmak için .config dosyalarındaki data_augmentation_options dosyasını kullanmaya çalışıyorum, ancak random_adjust_brightness seçeneğini etkinleştirdiğimde hata iletisini çok aşağıya yapıştırıyorum. hızlıca (adım 110000'den sonra seçeneği etkinleştiriyorum). Nesne Algılama API'sindeki veri büyütme seçeneklerini kullanarak hata oluştu
ben varsayılan değeri azaltarak çalıştı:optional float max_delta=1 [default=0.2];
Ama sonuç aynıydı.
Neden olursa olsun? Görüntüler png dosyalarından RGB'dir (Bosch Small Traffic Lights Dataset'dan).
INFO:tensorflow:global step 110011: loss = 22.7990 (0.357 sec/step)
INFO:tensorflow:global step 110012: loss = 47.8811 (0.401 sec/step)
2017-11-16 11:02:29.114785: W tensorflow/core/framework/op_kernel.cc:1192] Invalid argument: LossTensor is inf or nan. : Tensor had NaN values
[[Node: CheckNumerics = CheckNumerics[T=DT_FLOAT, message="LossTensor is inf or nan.", _device="/job:localhost/replica:0/task:0/device:CPU:0"](total_loss)]]
2017-11-16 11:02:29.114895: W tensorflow/core/framework/op_kernel.cc:1192] Invalid argument: LossTensor is inf or nan. : Tensor had NaN values
[[Node: CheckNumerics = CheckNumerics[T=DT_FLOAT, message="LossTensor is inf or nan.", _device="/job:localhost/replica:0/task:0/device:CPU:0"](total_loss)]]
2017-11-16 11:02:29.114969: W tensorflow/core/framework/op_kernel.cc:1192] Invalid argument: LossTensor is inf or nan. : Tensor had NaN values
[[Node: CheckNumerics = CheckNumerics[T=DT_FLOAT, message="LossTensor is inf or nan.", _device="/job:localhost/replica:0/task:0/device:CPU:0"](total_loss)]]
2017-11-16 11:02:29.115043: W tensorflow/core/framework/op_kernel.cc:1192] Invalid argument: LossTensor is inf or nan. : Tensor had NaN values
[[Node: CheckNumerics = CheckNumerics[T=DT_FLOAT, message="LossTensor is inf or nan.", _device="/job:localhost/replica:0/task:0/device:CPU:0"](total_loss)]]
2017-11-16 11:02:29.115112: W tensorflow/core/framework/op_kernel.cc:1192] Invalid argument: LossTensor is inf or nan. : Tensor had NaN values
...
Düzenleme: bulunan geçici çözüm bu olduğunu. Görüntü değerleri 0.0 ve 1.0 arasında olmalıdır varsayarak
def random_adjust_brightness(image, max_delta=0.2):
"""Randomly adjusts brightness.
Makes sure the output image is still between 0 and 1.
Args:
image: rank 3 float32 tensor contains 1 image -> [height, width, channels]
with pixel values varying between [0, 1].
max_delta: how much to change the brightness. A value between [0, 1).
Returns:
image: image which is the same shape as input image.
boxes: boxes which is the same shape as input boxes.
"""
with tf.name_scope('RandomAdjustBrightness', values=[image]):
image = tf.image.random_brightness(image, max_delta)
image = tf.clip_by_value(image, clip_value_min=0.0, clip_value_max=1.0)
return image
: inf ya da nan çok parlaklığı rasgele yaparken /object_detection/core/preprocessor.py işlevini kontrol kaybı bulunmaktadır. Görüntülerin aslında 0 ile ve hatta farklı bir aralık ile ulaşması mümkün mü? Bu durumda, kırpma onları bozar ve başarısızlığa yol açar. Uzun lafın kısası: Kırpma hattını yorumladım ve çalışıyor (sonuçları göreceğiz).