Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Train on Google Colab not working #4

Open
PhilippTriet opened this issue Aug 6, 2020 · 0 comments
Open

Train on Google Colab not working #4

PhilippTriet opened this issue Aug 6, 2020 · 0 comments

Comments

@PhilippTriet
Copy link

I always get the following error message when I try to train it on Google Colab. It works local and on Azure.

RuntimeError Traceback (most recent call last)

in ()
24 config['model']['class_scale'],
25 config['model']['object_scale'],
---> 26 config['model']['no_object_scale'])
27
28 # 2. Load the pretrained weights (if any)

5 frames

/content/drive/My Drive/Colab Notebooks/yolo/frontend.py in create_yolo(architecture, labels, input_size, anchors, coord_scale, class_scale, object_scale, no_object_scale)
33 n_classes = len(labels)
34 n_boxes = int(len(anchors)/2)
---> 35 yolo_network = create_yolo_network(architecture, input_size, n_classes, n_boxes)
36 yolo_loss = YoloLoss(yolo_network.get_grid_size(),
37 n_classes,

/content/drive/My Drive/Colab Notebooks/yolo/backend/network.py in create_yolo_network(architecture, input_size, nb_classes, nb_box)
17 input_size,
18 nb_classes,
---> 19 nb_box)
20 return yolo_net
21

/content/drive/My Drive/Colab Notebooks/yolo/backend/network.py in init(self, feature_extractor, input_size, nb_classes, nb_box)
38 grid_size = 7
39
---> 40 grid_size = feature_extractor.get_output_size()
41
42 print(grid_size)

/content/drive/My Drive/Colab Notebooks/yolo/backend/utils/feature.py in get_output_size(self)
59
60 def get_output_size(self):
---> 61 output_shape = self.feature_extractor.get_output_shape_at(-1)
62 assert output_shape[1] == output_shape[2]
63 return output_shape[1]

/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py in get_output_shape_at(self, node_index)
2028 """
2029 return self._get_node_attribute_at_index(node_index, 'output_shapes',
-> 2030 'output shape')
2031
2032 @doc_controls.do_not_doc_inheritable

/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py in _get_node_attribute_at_index(self, node_index, attr, attr_name)
2601 if not self._inbound_nodes:
2602 raise RuntimeError('The layer has never been called '
-> 2603 'and thus has no defined ' + attr_name + '.')
2604 if not len(self._inbound_nodes) > node_index:
2605 raise ValueError('Asked to get ' + attr_name + ' at node ' +

RuntimeError: The layer has never been called and thus has no defined output shape.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant