Skip to content

Commit

Permalink
Assignment 7.11
Browse files Browse the repository at this point in the history
  • Loading branch information
matin-ghorbani committed Apr 3, 2024
1 parent 96f6a0b commit bd65447
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions session_61_assignment_7.11/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
required=True, help='The sentence to test the model')
args.add_argument('--infer', type=bool, default=True,
action=BooleanOptionalAction, help='Whether to inferences the model with your sentence or not')
args.add_argument('--n-infer', type=int,
args.add_argument('--num-infer', type=int,
default=100, help='Number of inferences on your sentence')

opt = args.parse_args()
Expand All @@ -24,8 +24,8 @@

if opt.infer:
start_time = time()
for i in range(opt.n_infer):
for i in range(opt.num_infer):
classifier.predict(opt.sentence)

duration = time() - start_time
print(f'\nAverage inference time: {duration / opt.n_infer}')
print(f'\nAverage inference time: {duration / opt.num_infer}')

0 comments on commit bd65447

Please sign in to comment.