Comments (1)
It looks like you're encountering a type mismatch during the validation phase where the input tensor and weights are of different data types. This is common when you use mixed precision training, as certain tensors might be converted to half-precision (torch.cuda.HalfTensor
) while others remain in full precision (torch.cuda.FloatTensor
).
You can try ensuring that both your model and inputs are consistent in their data types. You might consider explicitly setting your model to use .float()
or .half()
before training to handle precision uniformly. Hereβs a specific modification you can make at the beginning of your training loop:
from ultralytics import YOLO
if __name__ == "__main__":
model = YOLO('path/to/your/yolov8.yaml').float() # Ensure model uses float32
results = model.train(data='path/to/your/dataset.yaml', epochs=100, imgsz=640, batch=2)
This modification ensures that your model uses 32-bit floating point precision consistently. If you intend to use mixed precision to leverage speedups from .half()
, make sure that your input data tensors and your model agree on the data type throughout the training process. If you're still facing issues or need further assistance, please let us know! π
from ultralytics.
Related Issues (20)
- YOLOv8 OBB HOT 1
- YOLOv8 with KAN HOT 2
- A question about validation set drawing image results HOT 2
- Determine the Class of a Specific Pixel-Coordinate from YOLOv8 Segmentation Results HOT 2
- Custom train for table structure HOT 4
- Please change this misleading tip HOT 2
- Tracking with 1 model and N multi-stream HOT 9
- edgetpu.ftlite is numpy.int8 but Coral only support uint8 input type HOT 1
- Getting error while Converting to tensorRT HOT 5
- Unable to Export RTDETR Large Model(best.pt) to TFLite or NCNN for Raspberry Pi 4 Deployment HOT 5
- Deepsparse provides empty results with custom yolov8 model HOT 5
- No inference with best.pt HOT 1
- YOLO HOT 2
- Training slow with large training imgsz HOT 4
- classification .pt to onnx predict error HOT 4
- onnx detect HOT 2
- ModuleNotFoundError: No module named 'ultralytics.nn.modules.conv'; 'ultralytics.nn.modules' is not a package HOT 2
- Custom model cannot export onnx from pt file HOT 2
- Custom tracker weight HOT 4
- YOLOv8 Pose estimation - Adjust label size HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ultralytics.