Reputation: 155
I have a function called "LoadDataClassForImageClassification" and i dont want the user to type it again and again... I tried
def LoadDataClassForImageClassification():
print('Loading...')
## ML THINGS
x = LoadDataClassForImageClassification()
x()
Upvotes: 3
Views: 58
Reputation: 222
You can create a variable that it's value is the address of the function
def LoadDataClassForImageClassification():
print('Loading...')
x = LoadDataClassForImageClassification
print(x) # <function LoadDataClassForImageClassification at 0x7f96363f11f0> # for example
x()
Upvotes: 8