Category Frameworks

122. Extracting Inference Results Using C

A semantic segmentation model outputs a tensor shaped [Batch_size,Channel(Number of Classes),Img_Height,Img_Width] (If using Pytorch), but if you convert that to a TensorRT engine for faster inference, the output is flattened to a 1d array. Therefore the shaping being, [(Batch_size)X(Channel)X(Img_Height)X(Img_Width),] Considering…

118. Pre-Fetching Data

Pre-fetching your data can help your data pre-processing pipeline more smoother. Without pre-fetching, the cpu would wait for the process in the GPU to end, and then start to prepare the next data. You can do this process in parallel…

113. Check Your Data..

When I was evaluating the model, both f1 score and jaccard score, for some reason, was decreasing as the model finishes more epochs. (Which is quite insane.) I’ve been checking the dimensions of the variables I was using to calculate…

94 TorchInfo

For a Tensorflow model, you can use .summary() to see the structure of your model. In pytorch, there is no such thing. So instead, you can use torchinfo. This was really useful when I wanted to do transfer-learning but didn’t…