Combinatorial Probabilistic Banknote Authentication
In this example, we will build a 1-layer RPN model with combinatorial_normal_expansion
, identity_reconciliation
and linear_remainder
for diagnosing the banknote disease based on the Banknote Authentication dataset.
We use mps
as the device for the model config file provided below.
Python Code and Model Configurations
rpn with identity reconciliation for mnist classification output
training model...
Epoch: 0, Test Loss: 1.9411336183547974, Test Score: 1.9411336696155832, Time Cost: 0.007844209671020508
Epoch: 100, Test Loss: 0.36659175157546997, Test Score: 0.366591744963078, Time Cost: 0.009141921997070312
Epoch: 200, Test Loss: 0.23675186932086945, Test Score: 0.23675185419647374, Time Cost: 0.008933782577514648
Epoch: 300, Test Loss: 0.17674371600151062, Test Score: 0.1767437075688446, Time Cost: 0.007529020309448242
Epoch: 400, Test Loss: 0.13803423941135406, Test Score: 0.1380342434864005, Time Cost: 0.0074062347412109375
Epoch: 500, Test Loss: 0.11002819240093231, Test Score: 0.11002819068762702, Time Cost: 0.007805824279785156
Epoch: 600, Test Loss: 0.08940108120441437, Test Score: 0.08940108904258437, Time Cost: 0.0074310302734375
Epoch: 700, Test Loss: 0.07411758601665497, Test Score: 0.07411758835844745, Time Cost: 0.0074651241302490234
Epoch: 800, Test Loss: 0.06268753856420517, Test Score: 0.06268753147146049, Time Cost: 0.007480144500732422
Epoch: 900, Test Loss: 0.054036639630794525, Test Score: 0.054036637264635624, Time Cost: 0.007607936859130859
Epoch: 1000, Test Loss: 0.04742664471268654, Test Score: 0.04742664752789012, Time Cost: 0.008695125579833984
Epoch: 1100, Test Loss: 0.04236285015940666, Test Score: 0.042362847759040485, Time Cost: 0.007869958877563477
Epoch: 1200, Test Loss: 0.03850637003779411, Test Score: 0.03850636577531528, Time Cost: 0.00732111930847168
Epoch: 1300, Test Loss: 0.03560876473784447, Test Score: 0.03560876589215595, Time Cost: 0.007487058639526367
Epoch: 1400, Test Loss: 0.03347256779670715, Test Score: 0.03347256692348597, Time Cost: 0.00847315788269043
model checkpoint saving to ./ckpt/banknote_configs_checkpoint...
evaluating result...
mse 0.03194525463030612
evaluating rounded prediction labels...
accuracy 0.9710144927536232