File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
session_61_assignment_7.11 Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 12
12
required = True , help = 'The sentence to test the model' )
13
13
args .add_argument ('--infer' , type = bool , default = True ,
14
14
action = BooleanOptionalAction , help = 'Whether to inferences the model with your sentence or not' )
15
- args .add_argument ('--n -infer' , type = int ,
15
+ args .add_argument ('--num -infer' , type = int ,
16
16
default = 100 , help = 'Number of inferences on your sentence' )
17
17
18
18
opt = args .parse_args ()
24
24
25
25
if opt .infer :
26
26
start_time = time ()
27
- for i in range (opt .n_infer ):
27
+ for i in range (opt .num_infer ):
28
28
classifier .predict (opt .sentence )
29
29
30
30
duration = time () - start_time
31
- print (f'\n Average inference time: { duration / opt .n_infer } ' )
31
+ print (f'\n Average inference time: { duration / opt .num_infer } ' )
You can’t perform that action at this time.
0 commit comments