For my case, the error "InvalidArgumentError: No DNN in stream executor" for training MaskR-CNN on Colab disappeared after I downgraded Tensorflow and tf-models-official to the versions 2.17.1 and 2.17.0 (the old version is 2.18.0 for both), respectively. Hopefully, it will work for you.