It seems you are using a Tensorflow model, while you’ve landed in the PyTorch discussion board. 
I would recommend to create a topic in their forum or StackOverflow, as you will most likely get a better answer there.
Based on the raised error, I would assume your passed argument should be one of the strings checked in the if-condition (e.g. depthflow, depth, etc.).