• Davis King's avatar
    Made resizable_tensor objects not perform a reallocation if they are resized to · 88d8b7c6
    Davis King authored
    be smaller.  Instead, they now behave like std::vector in that they just change
    their nominal size but keep the same memory, only reallocating if they are
    resized to something larger than their underlying memory block.
    
    This change makes some uses of dlib faster, in particular, running networks on
    a large set of images of differing sizes will now run faster since there won't
    be any GPU reallocations, which are notoriously slow.
    88d8b7c6
tensor.h 21 KB