def __init__(self, tensorflow_model_path, caffe_model_path_prefix, caffe_model_name, max_seq_length, max_decode_length, encoder_params, decoder_params, use_small_word_list=False, max_candidate_size=0, check=False, calc=False): Tensorflow2Caffe.__init__(self, tensorflow_model_path, caffe_model_path_prefix, caffe_model_name, check, calc) self.scopes[0] = "seq2seq_model" self.encoder_params = encoder_params self.decoder_params = decoder_params self.max_seq_length = max_seq_length self.max_decode_length = max_decode_length self.use_small_word_list = use_small_word_list self.max_candidate_size = max_candidate_size if (self.use_small_word_list and self.max_candidate_size == 0): self.max_candidate_size = self.max_seq_length * 50 + 2000 self.encoder_outputs = {}
def __init__(self, tensorflow_model_path, caffe_model_path_prefix, caffe_model_name, params, check=False, calc=False): Tensorflow2Caffe.__init__(self, tensorflow_model_path, caffe_model_path_prefix, caffe_model_name, check, calc) self.params = params
def __init__(self, tensorflow_model_path, caffe_model_path_prefix, caffe_model_name, base_params=None, nchwc8=True, first_frame=True, check=False, calc=False): Tensorflow2Caffe.__init__(self, tensorflow_model_path, caffe_model_path_prefix, caffe_model_name, check, calc) self.params = base_params self.nchwc8 = nchwc8 self.first_frame = first_frame self.mode = "infer" self.state_data_path = "./" self.save_state = True
def __init__(self, tensorflow_model_path, caffe_model_path_prefix, caffe_model_name, max_seq_length, embedding_dim, encoder_layers, num_heads, check=False, calc=False): Tensorflow2Caffe.__init__(self, tensorflow_model_path, caffe_model_path_prefix, caffe_model_name, check, calc) self.scopes[0] = "bert" self.max_seq_length = max_seq_length self.embedding_dim = embedding_dim self.encoder_layers = encoder_layers self.num_heads = num_heads
def __init__(self, tensorflow_model_path, caffe_model_path_prefix, caffe_model_name, max_seq_length, max_decode_length, encoder_params, decoder_params, check=False, calc=False): Tensorflow2Caffe.__init__(self, tensorflow_model_path, caffe_model_path_prefix, caffe_model_name, check, calc) self.scopes[0] = "seq2seq_model" self.encoder_params = encoder_params self.decoder_params = decoder_params self.max_seq_length = max_seq_length self.max_decode_length = max_decode_length self.encoder_outputs = {}