I see in the code that
MetalTensorDimensions(n: weight_shape[0], channels: weight_shape[1], width: weight_shape[2], height: weight_shape[3]).
Shouldn't the width to be the last dimension since caffe uses a row-major format? It is fine when the image is squared but not the general case.