# Training Retinanet

**URL:** <https://forums.developer.nvidia.com/t/training-retinanet/123515>\
**Category:** TAO Toolkit\
**Created:** [May 18, 2020, 6:46am UTC](https://forums.developer.nvidia.com/t/training-retinanet/123515 "2020-05-18T06:46:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![orene.elmaleh](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@orene.elmaleh](https://forums.developer.nvidia.com/u/orene.elmaleh)\
**Post date:** [May 18, 2020, 6:46am UTC](https://forums.developer.nvidia.com/t/training-retinanet/123515/1 "2020-05-18T06:46:32Z")

</div>

Hi,

I am facing some difficulties while trying to train Retinanet with my own Dataset.  
Here the snapshot describing the error encountered:

 ![image](https://global.discourse-cdn.com/nvidia/original/3X/3/0/3000fbec02f0f403926a00887eab8a02a6708032.png)

In the training specification txt file, I changed the size of input image such that it corresponds to my data (640x352).

I would be pleased if someone could help me to fix this.

---

<div class="post-metadata">

**Author:** ![Morganh](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/morganh/32/9748_2.png) [@Morganh](https://forums.developer.nvidia.com/u/Morganh)\
**Post date:** [May 18, 2020, 6:59am UTC](https://forums.developer.nvidia.com/t/training-retinanet/123515/3 "2020-05-18T06:59:33Z")

</div>

There should be some issues from your tfrecords.  
Please share the full log and spec when you run tlt-dataset-convert.

---

<div class="post-metadata">

**Author:** ![orene.elmaleh](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@orene.elmaleh](https://forums.developer.nvidia.com/u/orene.elmaleh)\
**Post date:** [May 18, 2020, 7:24am UTC](https://forums.developer.nvidia.com/t/training-retinanet/123515/4 "2020-05-18T07:24:51Z")

</div>

The specification file retinanet\_tfrecords\_kitti\_trainval.txt:

```nohighlight
  root_directory_path: "/workspace/tlt-experiments/data/training"
  image_dir_name: "image_2"
  label_dir_name: "label_2"
  image_extension: ".jpg"
  partition_mode: "random"
  num_partitions: 2
  val_split: 14
  num_shards: 10
}
image_directory_path: "/workspace/tlt-experiments/data/training"

```

And the log of the cmd tlt-dataset-convert:

 ![image](https://global.discourse-cdn.com/nvidia/original/3X/2/1/21b09f1db4bf8eb82ab481b3acebdb401171079b.png)

---

<div class="post-metadata">

**Author:** ![Morganh](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/morganh/32/9748_2.png) [@Morganh](https://forums.developer.nvidia.com/u/Morganh)\
**Post date:** [May 18, 2020, 3:01pm UTC](https://forums.developer.nvidia.com/t/training-retinanet/123515/5 "2020-05-18T15:01:08Z")

</div>

Your val image is too little, only 6.  
Please refer to [Training detectnet\_v2 Issue](https://forums.developer.nvidia.com/t/training-detectnet-v2-issue/115159)

1. val\_images \>= num\_shards
2. train\_images \>= num\_shards

---

<div class="post-metadata">

**Author:** ![orene.elmaleh](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@orene.elmaleh](https://forums.developer.nvidia.com/u/orene.elmaleh)\
**Post date:** [May 18, 2020, 6:31pm UTC](https://forums.developer.nvidia.com/t/training-retinanet/123515/6 "2020-05-18T18:31:48Z")

</div>

Thanks a lot, that just works!

---

<div class="post-metadata">

**Author:** ![TomNVIDIA](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/tomnvidia/32/14181_2.png) [@TomNVIDIA](https://forums.developer.nvidia.com/u/TomNVIDIA)\
**Post date:** [October 12, 2021, 4:24pm UTC](https://forums.developer.nvidia.com/t/training-retinanet/123515/8 "2021-10-12T16:24:38Z")

</div>

Closed on October 12, 2021, 4:24pm UTC


