> > Hello, > > > > On Fri, 2 Feb 2024, at 08:26, [email protected] wrote: > > > +static void infer_completion_callback(void *args) { > > > + THRequestItem *request = (THRequestItem*)args; > > > + LastLevelTaskItem *lltask = request->lltask; > > > + TaskItem *task = lltask->task; > > > + DNNData outputs = { 0 }; > > > + THInferRequest *infer_request = request->infer_request; > > > + THModel *th_model = (THModel *)task->model; > > > + torch::Tensor *output = infer_request->output; > > > + > > > + c10::IntArrayRef sizes = output->sizes(); > > > + assert(sizes.size == 5); > > > > Why 5? > > 5 means 5 channels: [batch_size, frame_number, channel, height, width]
Sorry, I mean 5 dimensions. > I only add video SR support, so it only support this type of data for now. > I will change the code to be more easy to read. > > > > > > + outputs.order = DCO_RGB; > > > + outputs.layout = DL_NCHW; > > > + outputs.dims[2] = sizes.at(3); > > > + outputs.dims[3] = sizes.at(4); > > > + outputs.dt = DNN_FLOAT; > > > + outputs.dims[1] = 3; > > > > Why 3? > > It is RGB so the channel is 3, but I should use sizes.at(2) instead of a magic > number. > Thanks for pointing it out. I will update it in patch v3. > > > > > > > -- > > Jean-Baptiste Kempf - President > > +33 672 704 734 > > _______________________________________________ > > ffmpeg-devel mailing list > > [email protected] > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > To unsubscribe, visit link above, or email > > [email protected] with subject "unsubscribe". > _______________________________________________ > ffmpeg-devel mailing list > [email protected] > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > [email protected] with subject "unsubscribe". _______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
