Open Ujassi opened 6 months ago
First of all, thank you so much for the answer.
It seems that memory leaks do not occur continuously. There is no problem with testing.
Due to my limited knowledge, I cannot find what needs to be modified to apply the NNCF PTQ. If you have time, I would appreciate it if you could check it out later.
Thank you again for your reply.
It could be OpenCV related: https://github.com/opencv/opencv/issues/5715?notification_referrer_id=MDE4Ok5vdGlmaWNhdGlvblRocmVhZDExMTYwNzQzOTozMjIwNjUxMQ%3D%3D#issuecomment-2067695016
Can you try adding these after the line https://github.com/Y-T-G/YOLO-NAS-OpenVino-cpp/blob/2856838d9004b0c097d3577f904db5197944325b/src/yolo_nas.cpp#L51
ppp.output(0).tensor().set_element_type(ov::element::f32);
ppp.output(1).tensor().set_element_type(ov::element::f32);
Thank you for your answer.
import nncf import openvino.runtime as ov import torch from torchvision import datasets, transforms
model = ov.Core().read_model("/model_path")
val_dataset = datasets.ImageFolder("/path", transform=transforms.Compose([transforms.ToTensor()])) dataset_loader = torch.utils.data.DataLoader(val_dataset, batch_size=1)
def transform_fn(dataitem): images, = data_item return images
calibration_dataset = nncf.Dataset(dataset_loader, transform_fn)
quantized_model = nncf.quantize(model, calibration_dataset)
ov.save_model(quantized_model, "/model_path")
4) PTQ and QAT were conducted following https://github.com/naseemap47/YOLO-NAS. But it doesn't work.
Could I possibly get some help?
Thank you so much.
Thank you so much for your reply.
First of all, thank you for creating the yolo-nas openvino code. I'm testing your code. I have two questions.
Is there a solution?
Thank you. Have a good day