関数から関数名をstrで取得する方法 [Python]

4月 3, 2022

models = [
        BarlowTwinsModel,
        BYOLModel,
        DINOModel,
        MocoModel,
        NNCLRModel,
        SimCLRModel,
        SimSiamModel,
        SwaVModel,
    ]

for BenchmarkModel in models:
    runs = []
    model_name = BenchmarkModel.__name__.replace('Model', '')

Python

Posted by vastee