Call the weight file of yolov3 with OpenCV to obtain the names of the three scale output layers and report an error
ln = [ln[i[0] - 1] for i in net.getUnconnectedOutLayers()]
Error reporting
indexerror: invalid index to scalar variable
This code was a few years ago. It may be a problem with the version. Now it will report an error
Solution:
Remove [0] and modify as below:
ln = [ln[i - 1] for i in net.getUnconnectedOutLayers()]
Read More:
- Error: Discrete value supplied to continuous scale [How to Solve]
- Libtorch Error: Expected object of type Variable but found type CUDALongType for argument #2 ‘index’
- R language learning problem solving error in output $nodeid: $operator is invalid for atomic vectors
- [Error] invalid operands to binary ^ (have ‘double‘ and ‘float‘)
- [Solved] RuntimeError: cuDNN error: CUDNN_STATUS_INTERNAL_ERROR
- [Solved] jetson Compile pytorch Error: internal compiler error: Segmentation fault
- Internalerror: GPU sync failed error (How to Solve)
- How to Solve Error: avoided redundant navigation to current location: “index/user”
- [Solved] Faceswap Error: CRITICAL An unexpected crash has occurred.You MUST provide this file if seeking assistan
- runtime error ‘9’: subscript out of range error in VBA programming
- [How to Solve] error Parsing error: x-invalid-end-tag
- [Solved] Milvus Error: [ERROR][SERVER][TakeToEUse milvus.has_collection to verify whether the collection exists
- [Solved] RuntimeError: Error(s) in loading state_dict for Model: Missing key(s) in state_dict
- Postgres Multiple data insertion error: The ‘default‘ dialect with current database version settings does not support
- Arrays must all be same length [How to Solve]
- JanusGraph Error: Unknown external index backend [How to Solve]
- [Solved] Android Studio Compile Error: Could not determine java version from ‘11.0.8‘.
- [Solved] Tensorflow-gpu Error: self._traceback = tf_stack.extract_stack()
- [Solved] Kafka Start Log Error: WARN Found a corrupted index file due to requirement failed: Corrupt index found
- Report Duplicate keys detected: ‘0’. This may cause an update error in VUE and the solution