Open SalehShmali opened 3 years ago
make virtual env with tensorflow version 2.1? tf ver 2.4 makes errors like above.
Hi, I changed the generator with the following function according to the tf2.4 documentation (https://www.tensorflow.org/api_docs/python/tf/keras/Model#fit) and it seems it works with batch size of 1. For batch size > 1 there is another issue according to #14
def faster_rcnn_generator(dataset, anchors, hyper_params):
"""Tensorflow data generator for fit method, yielding inputs and outputs.
inputs:
dataset = tf.data.Dataset, PaddedBatchDataset
anchors = (total_anchors, [y1, x1, y2, x2])
these values in normalized format between [0, 1]
hyper_params = dictionary
outputs:
yield inputs, outputs
"""
while True:
for image_data in dataset:
img, gt_boxes, gt_labels = image_data
bbox_deltas, bbox_labels = calculate_rpn_actual_outputs(anchors, gt_boxes, gt_labels, hyper_params)
yield (img, gt_boxes, gt_labels, bbox_deltas, bbox_labels),
Hi @colindecourt I encounter a error while doing with tensorflow 2.1 any idea how to handle that problem? I already open an issue #21. Feel free to drop by.
can any one solve this issue please on training faster_rcnn_trainer.py