Siamese networks for one class

Can I train a siamese network with just one class (say Dogs) and then feed it’s predictor Dogs and Cats and get good results? If so, is there any code available for that?