TensorRT  7.2.1.6
NVIDIA TensorRT
Looking for a C++ dev who knows TensorRT?
I'm looking for work. Hire me!
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
inference_c Namespace Reference

Functions

def parse_args ()
 
def question_features (tokens, question)
 
def inference (features, tokens)
 
def print_single_query (eval_time_elapsed, prediction, nbest_json)
 

Variables

def args = parse_args()
 
 paragraph_text = None
 
 squad_examples = None
 
 output_prediction_file = None
 
 f = open(args.passage_file, 'r')
 
 question_text = None
 
 tokenizer = tokenization.FullTokenizer(vocab_file=args.vocab_file, do_lower_case=True)
 
int doc_stride = 128
 
def max_seq_length = args.sequence_length
 
 bert = infer_c.bert_inf(args.engine, 1, max_seq_length, args.enable_graph)
 
 all_predictions = collections.OrderedDict()
 
 end
 
def features = question_features(example.doc_tokens, example.question_text)
 
 eval_time_elapsed
 
 prediction
 
 nbest_json
 
 doc_tokens = dp.convert_doc_tokens(paragraph_text)
 
list EXIT_CMDS = ["exit", "quit"]
 

Function Documentation

◆ parse_args()

def inference_c.parse_args ( )
Parse command line arguments

◆ question_features()

def inference_c.question_features (   tokens,
  question 
)

◆ inference()

def inference_c.inference (   features,
  tokens 
)

◆ print_single_query()

def inference_c.print_single_query (   eval_time_elapsed,
  prediction,
  nbest_json 
)

Variable Documentation

◆ args

def inference_c.args = parse_args()

◆ paragraph_text

string inference_c.paragraph_text = None

◆ squad_examples

inference_c.squad_examples = None

◆ output_prediction_file

def inference_c.output_prediction_file = None

◆ f

inference_c.f = open(args.passage_file, 'r')

◆ question_text

string inference_c.question_text = None

◆ tokenizer

inference_c.tokenizer = tokenization.FullTokenizer(vocab_file=args.vocab_file, do_lower_case=True)

◆ doc_stride

int inference_c.doc_stride = 128

◆ max_seq_length

def inference_c.max_seq_length = args.sequence_length

◆ bert

inference_c.bert = infer_c.bert_inf(args.engine, 1, max_seq_length, args.enable_graph)

◆ all_predictions

inference_c.all_predictions = collections.OrderedDict()

◆ end

inference_c.end

◆ features

def inference_c.features = question_features(example.doc_tokens, example.question_text)

◆ eval_time_elapsed

inference_c.eval_time_elapsed

◆ prediction

inference_c.prediction

◆ nbest_json

inference_c.nbest_json

◆ doc_tokens

inference_c.doc_tokens = dp.convert_doc_tokens(paragraph_text)

◆ EXIT_CMDS

list inference_c.EXIT_CMDS = ["exit", "quit"]