'the following arguments are required: -m/--model, -o/--output

I am attempting to run a GoogLeNet code, but then get this error:

C:\Users\JG\AppData\Local\Programs\Python\Python39\python.exe C:/Users/JG/PycharmProjects/GoogLeNet/googlenet_cifar10.py
2022-05-14 14:47:18.996037: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudart64_110.dll
usage: googlenet_cifar10.py [-h] -m MODEL -o OUTPUT
googlenet_cifar10.py: error: the following arguments are required: -m/--model, -o/--output

Process finished with exit code 2

But I do not know where the issue is coming from. I know that the following argument is listed.

# construct the argument parser
ap = argparse.ArgumentParser()
ap.add_argument("-m", "--model", required = True, help = "path to output model")
ap.add_argument("-o", "--output", required = True,
    help = "path to output directory (logs, plots, etc.)")
args = vars(ap.parse_args())


Solution 1:[1]

You need to provide those two arguments for the script to run. As it says in the README file:

python googlenet_cifar10.py --model output/minigooglenet_cifar10.hdf5 --output output

The part of the script that you have posted does two things. (1) It requires arguments -m and -o from the user and (2) it parses those arguments for later use.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jafar Isbarov