Accuracy of MLM model

How to calculate the accuracy of the testing dataset when we build MLM model using scrach?