You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
good day!
i found when i test your cord
look at the error massege
occurred some error
in Configuring a Training Pipeline
AttributeError Traceback (most recent call last)
in ()
1 import re
----> 2 num_classes = get_num_classes(label_map_pbtxt_fname)
3 filename = '/content/models/research/object_detection/samples/configs/faster_rcnn_inception_v2_pets.config'
4 with open(pipeline_fname) as f:
5 s = f.read()
1 frames
/content/models/research/object_detection/utils/label_map_util.py in load_labelmap(path)
136 a StringIntLabelMapProto
137 """
--> 138 with tf.gfile.GFile(path, 'r') as fid:
139 label_map_string = fid.read()
140 label_map = string_int_label_map_pb2.StringIntLabelMap()
AttributeError: module 'tensorflow' has no attribute 'gfile'
`import re
num_classes = get_num_classes(label_map_pbtxt_fname)
filename = '/content/models/research/object_detection/samples/configs/faster_rcnn_inception_v2_pets.config'
with open(pipeline_fname) as f:
s = f.read()
with open(pipeline_fname, 'w') as f:
# fine_tune_checkpoint
s = re.sub('fine_tune_checkpoint: ".*?"',
'fine_tune_checkpoint: "{}"'.format(fine_tune_checkpoint), s)
# tfrecord files train and test.
s = re.sub(
'(input_path: ".*?)(train.record)(.*?")', 'input_path: "{}"'.format(train_record_fname), s)
s = re.sub(
'(input_path: ".*?)(val.record)(.*?")', 'input_path: "{}"'.format(test_record_fname), s)
# label_map_path
s = re.sub(
'label_map_path: ".*?"', 'label_map_path: "{}"'.format(label_map_pbtxt_fname), s)
# Set training batch_size.
s = re.sub('batch_size: [0-9]+',
'batch_size: {}'.format(batch_size), s)
# Set training steps, num_steps
s = re.sub('num_steps: [0-9]+',
'num_steps: {}'.format(num_steps), s)
# Set number of classes num_classes.
s = re.sub('num_classes: [0-9]+',
'num_classes: {}'.format(num_classes), s)
f.write(s)`
The text was updated successfully, but these errors were encountered:
good day!
i found when i test your cord
look at the error massege
occurred some error
in Configuring a Training Pipeline
AttributeError Traceback (most recent call last)
in ()
1 import re
----> 2 num_classes = get_num_classes(label_map_pbtxt_fname)
3 filename = '/content/models/research/object_detection/samples/configs/faster_rcnn_inception_v2_pets.config'
4 with open(pipeline_fname) as f:
5 s = f.read()
1 frames
/content/models/research/object_detection/utils/label_map_util.py in load_labelmap(path)
136 a StringIntLabelMapProto
137 """
--> 138 with tf.gfile.GFile(path, 'r') as fid:
139 label_map_string = fid.read()
140 label_map = string_int_label_map_pb2.StringIntLabelMap()
AttributeError: module 'tensorflow' has no attribute 'gfile'
`import re
num_classes = get_num_classes(label_map_pbtxt_fname)
filename = '/content/models/research/object_detection/samples/configs/faster_rcnn_inception_v2_pets.config'
with open(pipeline_fname) as f:
s = f.read()
with open(pipeline_fname, 'w') as f:
The text was updated successfully, but these errors were encountered: