import pickle

import numpy as np
from matplotlib import pyplot as plt




class    lowercase_  :



	"""simple docstring"""





	def __init__(							self		,			__SCREAMING_SNAKE_CASE		,			__SCREAMING_SNAKE_CASE		,			__SCREAMING_SNAKE_CASE		,			__SCREAMING_SNAKE_CASE		,			__SCREAMING_SNAKE_CASE		,			__SCREAMING_SNAKE_CASE=0.2		,			__SCREAMING_SNAKE_CASE=0.2				)						->int:
								lowerCAmelCase			=		bp_numa
								lowerCAmelCase			=		bp_numa
								lowerCAmelCase			=		bp_numa
								lowerCAmelCase			=		conva_get[:2]
								lowerCAmelCase			=		conva_get[2]
								lowerCAmelCase			=		size_pa
								lowerCAmelCase			=		rate_w
								lowerCAmelCase			=		rate_t
								lowerCAmelCase			=		[
								    np.mat(-1 * np.random.rand(self.conva[0]		,			self.conva[0]				) + 0.5				)
								    for i in range(self.conva[1]				)
								]
								lowerCAmelCase			=		np.mat(-1 * np.random.rand(self.num_bpa		,			self.num_bpa				) + 0.5				)
								lowerCAmelCase			=		np.mat(-1 * np.random.rand(self.num_bpa		,			self.num_bpa				) + 0.5				)
								lowerCAmelCase			=		-2 * np.random.rand(self.conva[1]				) + 1
								lowerCAmelCase			=		-2 * np.random.rand(self.num_bpa				) + 1
								lowerCAmelCase			=		-2 * np.random.rand(self.num_bpa				) + 1


	def 			SCREAMING_SNAKE_CASE_				(							self		,			__SCREAMING_SNAKE_CASE				)						->List[str]:
								# save model dict with pickle
								lowerCAmelCase			=		{
								    '''num_bp1''': self.num_bpa,
								    '''num_bp2''': self.num_bpa,
								    '''num_bp3''': self.num_bpa,
								    '''conv1''': self.conva,
								    '''step_conv1''': self.step_conva,
								    '''size_pooling1''': self.size_poolinga,
								    '''rate_weight''': self.rate_weight,
								    '''rate_thre''': self.rate_thre,
								    '''w_conv1''': self.w_conva,
								    '''wkj''': self.wkj,
								    '''vji''': self.vji,
								    '''thre_conv1''': self.thre_conva,
								    '''thre_bp2''': self.thre_bpa,
								    '''thre_bp3''': self.thre_bpa,
								}
								with open(UpperCAmelCase__		,			'''wb'''				) as f:
															pickle.dump(UpperCAmelCase__		,			UpperCAmelCase__				)

								print(F"Model saved： {save_path}"				)


	@classmethod
	def 			SCREAMING_SNAKE_CASE_				(							cls		,			__SCREAMING_SNAKE_CASE				)						->List[str]:
								# read saved model
								with open(UpperCAmelCase__		,			'''rb'''				) as f:
															lowerCAmelCase			=		pickle.load(UpperCAmelCase__				)  # noqa: S301

								lowerCAmelCase			=		model_dic.get('''conv1'''				)
								conv_get.append(model_dic.get('''step_conv1'''				)				)
								lowerCAmelCase			=		model_dic.get('''size_pooling1'''				)
								lowerCAmelCase			=		model_dic.get('''num_bp1'''				)
								lowerCAmelCase			=		model_dic.get('''num_bp2'''				)
								lowerCAmelCase			=		model_dic.get('''num_bp3'''				)
								lowerCAmelCase			=		model_dic.get('''rate_weight'''				)
								lowerCAmelCase			=		model_dic.get('''rate_thre'''				)
								# create model instance
								lowerCAmelCase			=		CNN(UpperCAmelCase__		,			UpperCAmelCase__		,			UpperCAmelCase__		,			UpperCAmelCase__		,			UpperCAmelCase__		,			UpperCAmelCase__		,			UpperCAmelCase__				)
								# modify model parameter
								lowerCAmelCase			=		model_dic.get('''w_conv1'''				)
								lowerCAmelCase			=		model_dic.get('''wkj'''				)
								lowerCAmelCase			=		model_dic.get('''vji'''				)
								lowerCAmelCase			=		model_dic.get('''thre_conv1'''				)
								lowerCAmelCase			=		model_dic.get('''thre_bp2'''				)
								lowerCAmelCase			=		model_dic.get('''thre_bp3'''				)
								return conv_ins


	def 			SCREAMING_SNAKE_CASE_				(							self		,			__SCREAMING_SNAKE_CASE				)						->Tuple:
								return 1 / (1 + np.exp(-1 * x				))


	def 			SCREAMING_SNAKE_CASE_				(							self		,			__SCREAMING_SNAKE_CASE				)						->List[str]:
								return round(UpperCAmelCase__		,			3				)


	def 			SCREAMING_SNAKE_CASE_				(							self		,			__SCREAMING_SNAKE_CASE		,			__SCREAMING_SNAKE_CASE		,			__SCREAMING_SNAKE_CASE		,			__SCREAMING_SNAKE_CASE		,			__SCREAMING_SNAKE_CASE				)						->Optional[Any]:
								# convolution process
								lowerCAmelCase			=		convs[0]
								lowerCAmelCase			=		convs[1]
								lowerCAmelCase			=		np.shape(UpperCAmelCase__				)[0]
								# get the data slice of original image data, data_focus
								lowerCAmelCase			=		[]
								for i_focus in range(0		,			size_data - size_conv + 1		,			UpperCAmelCase__				):
															for j_focus in range(0		,			size_data - size_conv + 1		,			UpperCAmelCase__				):
																						lowerCAmelCase			=		data[
																						    i_focus : i_focus + size_conv, j_focus : j_focus + size_conv
																						]
																						data_focus.append(UpperCAmelCase__				)
															 # calculate the feature map of every single kernel, and saved as list of matrix
								lowerCAmelCase			=		[]
								lowerCAmelCase			=		int((size_data - size_conv) / conv_step + 1				)
								for i_map in range(UpperCAmelCase__				):
															lowerCAmelCase			=		[]
															for i_focus in range(len(UpperCAmelCase__				)				):
																						lowerCAmelCase			=		(
																						    np.sum(np.multiply(data_focus[i_focus]		,			w_convs[i_map]				)				)
																						    - thre_convs[i_map]
																						)
																						featuremap.append(self.sig(UpperCAmelCase__				)				)
															lowerCAmelCase			=		np.asmatrix(UpperCAmelCase__				).reshape(
															    UpperCAmelCase__		,			UpperCAmelCase__				)
															data_featuremap.append(UpperCAmelCase__				)

								# expanding the data slice to One dimenssion
								lowerCAmelCase			=		[]
								for each_focus in data_focus:
															focusa_list.extend(self.Expand_Mat(UpperCAmelCase__				)				)
								lowerCAmelCase			=		np.asarray(UpperCAmelCase__				)
								return focus_list, data_featuremap


	def 			SCREAMING_SNAKE_CASE_				(							self		,			__SCREAMING_SNAKE_CASE		,			__SCREAMING_SNAKE_CASE		,			__SCREAMING_SNAKE_CASE="average_pool"				)						->Union[str, Any]:
								# pooling process
								lowerCAmelCase			=		len(featuremaps[0]				)
								lowerCAmelCase			=		int(size_map / size_pooling				)
								lowerCAmelCase			=		[]
								for i_map in range(len(UpperCAmelCase__				)				):
															lowerCAmelCase			=		featuremaps[i_map]
															lowerCAmelCase			=		[]
															for i_focus in range(0		,			UpperCAmelCase__		,			UpperCAmelCase__				):
																						for j_focus in range(0		,			UpperCAmelCase__		,			UpperCAmelCase__				):
																													lowerCAmelCase			=		feature_map[
																													    i_focus : i_focus + size_pooling,
																													    j_focus : j_focus + size_pooling,
																													]
																													if pooling_type == "average_pool":
																																				# average pooling
																																				map_pooled.append(np.average(UpperCAmelCase__				)				)
																													elif pooling_type == "max_pooling":
																																				# max pooling
																																				map_pooled.append(np.max(UpperCAmelCase__				)				)
															lowerCAmelCase			=		np.asmatrix(UpperCAmelCase__				).reshape(UpperCAmelCase__		,			UpperCAmelCase__				)
															featuremap_pooled.append(UpperCAmelCase__				)
								return featuremap_pooled


	def 			SCREAMING_SNAKE_CASE_				(							self		,			__SCREAMING_SNAKE_CASE				)						->Optional[int]:
								# expanding three dimension data to one dimension list
								lowerCAmelCase			=		[]
								for i in range(len(UpperCAmelCase__				)				):
															lowerCAmelCase			=		np.shape(data[i]				)
															lowerCAmelCase			=		data[i].reshape(1		,			shapes[0] * shapes[1]				)
															lowerCAmelCase			=		data_listed.getA().tolist()[0]
															data_expanded.extend(UpperCAmelCase__				)
								lowerCAmelCase			=		np.asarray(UpperCAmelCase__				)
								return data_expanded


	def 			SCREAMING_SNAKE_CASE_				(							self		,			__SCREAMING_SNAKE_CASE				)						->List[Any]:
								# expanding matrix to one dimension list
								lowerCAmelCase			=		np.asarray(UpperCAmelCase__				)
								lowerCAmelCase			=		np.shape(UpperCAmelCase__				)
								lowerCAmelCase			=		data_mat.reshape(1		,			shapes[0] * shapes[1]				)
								return data_expanded


	def 			SCREAMING_SNAKE_CASE_				(							self		,			__SCREAMING_SNAKE_CASE		,			__SCREAMING_SNAKE_CASE		,			__SCREAMING_SNAKE_CASE		,			__SCREAMING_SNAKE_CASE		,			__SCREAMING_SNAKE_CASE				)						->Optional[Any]:
								lowerCAmelCase			=		[]
								lowerCAmelCase			=		0
								for i_map in range(UpperCAmelCase__				):
															lowerCAmelCase			=		np.ones((size_map, size_map)				)
															for i in range(0		,			UpperCAmelCase__		,			UpperCAmelCase__				):
																						for j in range(0		,			UpperCAmelCase__		,			UpperCAmelCase__				):
																													lowerCAmelCase			=		pd_pool[
																													    i_pool
																													]
																													lowerCAmelCase			=		i_pool + 1
															lowerCAmelCase			=		np.multiply(
															    UpperCAmelCase__		,			np.multiply(out_map[i_map]		,			(1 - out_map[i_map])				)				)
															pd_all.append(UpperCAmelCase__				)
								return pd_all


	def 			SCREAMING_SNAKE_CASE_				(							self		,			__SCREAMING_SNAKE_CASE		,			__SCREAMING_SNAKE_CASE		,			__SCREAMING_SNAKE_CASE		,			__SCREAMING_SNAKE_CASE		,			__SCREAMING_SNAKE_CASE		,			__SCREAMING_SNAKE_CASE=bool				)						->List[str]:
								# model traning
								print('''----------------------Start Training-------------------------'''				)
								print((''' - - Shape: Train_Data  ''', np.shape(UpperCAmelCase__				))				)
								print((''' - - Shape: Teach_Data  ''', np.shape(UpperCAmelCase__				))				)
								lowerCAmelCase			=		0
								lowerCAmelCase			=		[]
								lowerCAmelCase			=		10000
								while rp < n_repeat and mse >= error_accuracy:
															lowerCAmelCase			=		0
															print(F"-------------Learning Time {rp}--------------"				)
															for p in range(len(UpperCAmelCase__				)				):
																						# print('------------Learning Image: %d--------------'%p)
																						lowerCAmelCase			=		np.asmatrix(datas_train[p]				)
																						lowerCAmelCase			=		np.asarray(datas_teach[p]				)
																						lowerCAmelCase		,      lowerCAmelCase			=		self.convolute(
																						    UpperCAmelCase__		,			self.conva		,			self.w_conva		,			self.thre_conva		,			conv_step=self.step_conva		,			)
																						lowerCAmelCase			=		self.pooling(UpperCAmelCase__		,			self.size_poolinga				)
																						lowerCAmelCase			=		np.shape(UpperCAmelCase__				)
																						lowerCAmelCase			=		self._expand(UpperCAmelCase__				)
																						lowerCAmelCase			=		data_bp_input

																						lowerCAmelCase			=		np.dot(UpperCAmelCase__		,			self.vji.T				) - self.thre_bpa
																						lowerCAmelCase			=		self.sig(UpperCAmelCase__				)
																						lowerCAmelCase			=		np.dot(UpperCAmelCase__		,			self.wkj.T				) - self.thre_bpa
																						lowerCAmelCase			=		self.sig(UpperCAmelCase__				)

																						# --------------Model Leaning ------------------------
																						# calculate error and gradient---------------
																						lowerCAmelCase			=		np.multiply(
																						    (data_teach - bp_outa)		,			np.multiply(UpperCAmelCase__		,			(1 - bp_outa)				)				)
																						lowerCAmelCase			=		np.multiply(
																						    np.dot(UpperCAmelCase__		,			self.wkj				)		,			np.multiply(UpperCAmelCase__		,			(1 - bp_outa)				)				)
																						lowerCAmelCase			=		np.dot(UpperCAmelCase__		,			self.vji				)

																						lowerCAmelCase			=		pd_i_all / (self.size_poolinga * self.size_poolinga)
																						lowerCAmelCase			=		pd_conva_pooled.T.getA().tolist()
																						lowerCAmelCase			=		self._calculate_gradient_from_pool(
																						    UpperCAmelCase__		,			UpperCAmelCase__		,			shape_featuremapa[0]		,			shape_featuremapa[1]		,			self.size_poolinga		,			)
																						# weight and threshold learning process---------
																						# convolution layer
																						for k_conv in range(self.conva[1]				):
																													lowerCAmelCase			=		self._expand_mat(pd_conva_all[k_conv]				)
																													lowerCAmelCase			=		self.rate_weight * np.dot(UpperCAmelCase__		,			UpperCAmelCase__				)

																													lowerCAmelCase			=		self.w_conva[k_conv] + delta_w.reshape(
																													    (self.conva[0], self.conva[0])				)

																													lowerCAmelCase			=		(
																													    self.thre_conva[k_conv]
																													    - np.sum(pd_conva_all[k_conv]				) * self.rate_thre
																													)
																						# all connected layer
																						lowerCAmelCase			=		self.wkj + pd_k_all.T * bp_outa * self.rate_weight
																						lowerCAmelCase			=		self.vji + pd_j_all.T * bp_outa * self.rate_weight
																						lowerCAmelCase			=		self.thre_bpa - pd_k_all * self.rate_thre
																						lowerCAmelCase			=		self.thre_bpa - pd_j_all * self.rate_thre
																						# calculate the sum error of all single image
																						lowerCAmelCase			=		np.sum(abs(data_teach - bp_outa				)				)
																						error_count += errors
																						# print('   ----Teach      ',data_teach)
																						# print('   ----BP_output  ',bp_out3)
															lowerCAmelCase			=		rp + 1
															lowerCAmelCase			=		error_count / patterns
															all_mse.append(UpperCAmelCase__				)

								def draw_error():
															lowerCAmelCase			=		[error_accuracy for i in range(int(n_repeat * 1.2				)				)]
															plt.plot(UpperCAmelCase__		,			'''+-'''				)
															plt.plot(UpperCAmelCase__		,			'''r--'''				)
															plt.xlabel('''Learning Times'''				)
															plt.ylabel('''All_mse'''				)
															plt.grid(UpperCAmelCase__		,			alpha=0.5				)
															plt.show()

								print('''------------------Training Complished---------------------'''				)
								print((''' - - Training epoch: ''', rp, F"     - - Mse: {mse:.6f}")				)
								if draw_e:
															draw_error()
								return mse


	def 			SCREAMING_SNAKE_CASE_				(							self		,			__SCREAMING_SNAKE_CASE				)						->Union[str, Any]:
								# model predict
								lowerCAmelCase			=		[]
								print('''-------------------Start Testing-------------------------'''				)
								print((''' - - Shape: Test_Data  ''', np.shape(UpperCAmelCase__				))				)
								for p in range(len(UpperCAmelCase__				)				):
															lowerCAmelCase			=		np.asmatrix(datas_test[p]				)
															lowerCAmelCase		,      lowerCAmelCase			=		self.convolute(
															    UpperCAmelCase__		,			self.conva		,			self.w_conva		,			self.thre_conva		,			conv_step=self.step_conva		,			)
															lowerCAmelCase			=		self.pooling(UpperCAmelCase__		,			self.size_poolinga				)
															lowerCAmelCase			=		self._expand(UpperCAmelCase__				)

															lowerCAmelCase			=		data_bp_input
															lowerCAmelCase			=		bp_outa * self.vji.T - self.thre_bpa
															lowerCAmelCase			=		self.sig(UpperCAmelCase__				)
															lowerCAmelCase			=		bp_outa * self.wkj.T - self.thre_bpa
															lowerCAmelCase			=		self.sig(UpperCAmelCase__				)
															produce_out.extend(bp_outa.getA().tolist()				)
								lowerCAmelCase			=		[list(map(self.do_round		,			UpperCAmelCase__				)				) for each in produce_out]
								return np.asarray(UpperCAmelCase__				)




	def 			SCREAMING_SNAKE_CASE_				(							self		,			__SCREAMING_SNAKE_CASE				)						->Tuple:
								# return the data of image after convoluting process so we can check it out
								lowerCAmelCase			=		np.asmatrix(UpperCAmelCase__				)
								lowerCAmelCase		,      lowerCAmelCase			=		self.convolute(
								    UpperCAmelCase__		,			self.conva		,			self.w_conva		,			self.thre_conva		,			conv_step=self.step_conva		,			)
								lowerCAmelCase			=		self.pooling(UpperCAmelCase__		,			self.size_poolinga				)

								return data_conveda, data_pooleda


if __name__ == "__main__":
	pass






"""simple docstring"""





from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder


# @@protoc_insertion_point(imports)

_a       =							_symbol_database.Default()


_a       =							_descriptor_pool.Default().AddSerializedFile(
    b'\n\x19sentencepiece_model.proto\x12\rsentencepiece"\x80\x0c\n\x0bTrainerSpec\x12\r\n\x05input\x18\x01 \x03(\t\x12\x14\n\x0cinput_format\x18\x07 \x01(\t\x12\x14\n\x0cmodel_prefix\x18\x02 \x01(\t\x12\x41\n\nmodel_type\x18\x03 \x01(\x0e\x32$.sentencepiece.TrainerSpec.ModelType:\x07UNIGRAM\x12\x18\n\nvocab_size\x18\x04 \x01(\x05:\x04\x38\x30\x30\x30\x12\x17\n\x0f\x61\x63\x63\x65pt_language\x18\x05 \x03(\t\x12 \n\x15self_test_sample_size\x18\x06 \x01(\x05:\x01\x30\x12*\n\x1b\x65nable_differential_privacy\x18\x32 \x01(\x08:\x05\x66\x61lse\x12+\n differential_privacy_noise_level\x18\x33 \x01(\x02:\x01\x30\x12\x32\n\'differential_privacy_clipping_threshold\x18\x34 \x01(\x04:\x01\x30\x12"\n\x12\x63haracter_coverage\x18\n \x01(\x02:\x06\x30.9995\x12\x1e\n\x13input_sentence_size\x18\x0b \x01(\x04:\x01\x30\x12$\n\x16shuffle_input_sentence\x18\x13 \x01(\x08:\x04true\x12 \n\x14mining_sentence_size\x18\x0c \x01(\x05\x42\x02\x18\x01\x12"\n\x16training_sentence_size\x18\r \x01(\x05\x42\x02\x18\x01\x12(\n\x17seed_sentencepiece_size\x18\x0e \x01(\x05:\x07\x31\x30\x30\x30\x30\x30\x30\x12\x1e\n\x10shrinking_factor\x18\x0f \x01(\x02:\x04\x30.75\x12!\n\x13max_sentence_length\x18\x12 \x01(\x05:\x04\x34\x31\x39\x32\x12\x17\n\x0bnum_threads\x18\x10 \x01(\x05:\x02\x31\x36\x12\x1d\n\x12num_sub_iterations\x18\x11 \x01(\x05:\x01\x32\x12$\n\x18max_sentencepiece_length\x18\x14 \x01(\x05:\x02\x31\x36\x12%\n\x17split_by_unicode_script\x18\x15 \x01(\x08:\x04true\x12\x1d\n\x0fsplit_by_number\x18\x17 \x01(\x08:\x04true\x12!\n\x13split_by_whitespace\x18\x16 \x01(\x08:\x04true\x12)\n\x1atreat_whitespace_as_suffix\x18\x18 \x01(\x08:\x05\x66\x61lse\x12+\n\x1c\x61llow_whitespace_only_pieces\x18\x1a \x01(\x08:\x05\x66\x61lse\x12\x1b\n\x0csplit_digits\x18\x19 \x01(\x08:\x05\x66\x61lse\x12#\n\x19pretokenization_delimiter\x18\x35 \x01(\t:\x00\x12\x17\n\x0f\x63ontrol_symbols\x18\x1e \x03(\t\x12\x1c\n\x14user_defined_symbols\x18\x1f \x03(\t\x12\x16\n\x0erequired_chars\x18$ \x01(\t\x12\x1c\n\rbyte_fallback\x18# \x01(\x08:\x05\x66\x61lse\x12+\n\x1dvocabulary_output_piece_score\x18  \x01(\x08:\x04true\x12\x1e\n\x10hard_vocab_limit\x18! \x01(\x08:\x04true\x12\x1c\n\ruse_all_vocab\x18" \x01(\x08:\x05\x66\x61lse\x12\x11\n\x06unk_id\x18( \x01(\x05:\x01\x30\x12\x11\n\x06\x62os_id\x18) \x01(\x05:\x01\x31\x12\x11\n\x06\x65os_id\x18* \x01(\x05:\x01\x32\x12\x12\n\x06pad_id\x18+ \x01(\x05:\x02-1\x12\x18\n\tunk_piece\x18- \x01(\t:\x05<unk>\x12\x16\n\tbos_piece\x18. \x01(\t:\x03<s>\x12\x17\n\teos_piece\x18/ \x01(\t:\x04</s>\x12\x18\n\tpad_piece\x18\x30 \x01(\t:\x05<pad>\x12\x1a\n\x0bunk_surface\x18, \x01(\t:\x05 \xe2\x81\x87 \x12+\n\x1ctrain_extremely_large_corpus\x18\x31 \x01(\x08:\x05\x66\x61lse"5\n\tModelType\x12\x0b\n\x07UNIGRAM\x10\x01\x12\x07\n\x03\x42PE\x10\x02\x12\x08\n\x04WORD\x10\x03\x12\x08\n\x04\x43HAR\x10\x04*\t\x08\xc8\x01\x10\x80\x80\x80\x80\x02"\xd1\x01\n\x0eNormalizerSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1c\n\x14precompiled_charsmap\x18\x02 \x01(\x0c\x12\x1e\n\x10\x61\x64\x64_dummy_prefix\x18\x03 \x01(\x08:\x04true\x12&\n\x18remove_extra_whitespaces\x18\x04 \x01(\x08:\x04true\x12 \n\x12\x65scape_whitespaces\x18\x05 \x01(\x08:\x04true\x12\x1e\n\x16normalization_rule_tsv\x18\x06 \x01(\t*\t\x08\xc8\x01\x10\x80\x80\x80\x80\x02"y\n\x0cSelfTestData\x12\x33\n\x07samples\x18\x01 \x03(\x0b\x32".sentencepiece.SelfTestData.Sample\x1a)\n\x06Sample\x12\r\n\x05input\x18\x01 \x01(\t\x12\x10\n\x08\x65xpected\x18\x02 \x01(\t*\t\x08\xc8\x01\x10\x80\x80\x80\x80\x02"\xfe\x03\n\nModelProto\x12\x37\n\x06pieces\x18\x01 \x03(\x0b\x32\'.sentencepiece.ModelProto.SentencePiece\x12\x30\n\x0ctrainer_spec\x18\x02 \x01(\x0b\x32\x1a.sentencepiece.TrainerSpec\x12\x36\n\x0fnormalizer_spec\x18\x03 \x01(\x0b\x32\x1d.sentencepiece.NormalizerSpec\x12\x33\n\x0eself_test_data\x18\x04 \x01(\x0b\x32\x1b.sentencepiece.SelfTestData\x12\x38\n\x11\x64\x65normalizer_spec\x18\x05 \x01(\x0b\x32\x1d.sentencepiece.NormalizerSpec\x1a\xd2\x01\n\rSentencePiece\x12\r\n\x05piece\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x02\x12\x42\n\x04type\x18\x03 \x01(\x0e\x32,.sentencepiece.ModelProto.SentencePiece.Type:\x06NORMAL"T\n\x04Type\x12\n\n\x06NORMAL\x10\x01\x12\x0b\n\x07UNKNOWN\x10\x02\x12\x0b\n\x07\x43ONTROL\x10\x03\x12\x10\n\x0cUSER_DEFINED\x10\x04\x12\x08\n\x04\x42YTE\x10\x06\x12\n\n\x06UNUSED\x10\x05*\t\x08\xc8\x01\x10\x80\x80\x80\x80\x02*\t\x08\xc8\x01\x10\x80\x80\x80\x80\x02\x42\x02H\x03'
)

_a       =							globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'sentencepiece_model_pb2', _globals)
if _descriptor._USE_C_DESCRIPTORS is False:
   _a       =							None
   _a       =							b'H\003'
   # (generated by protobuf compiler, but `_TRAINERSPEC` is not defined)
   # _TRAINERSPEC.fields_by_name["mining_sentence_size"]._options = None
   # _TRAINERSPEC.fields_by_name["mining_sentence_size"]._serialized_options = b"\030\001"
   # _TRAINERSPEC.fields_by_name["training_sentence_size"]._options = None
   # _TRAINERSPEC.fields_by_name["training_sentence_size"]._serialized_options = b"\030\001"
   _a       =							45
   _a       =							15_81
   _a       =							15_17
   _a       =							15_70
   _a       =							15_84
   _a       =							17_93
   _a       =							17_95
   _a       =							19_16
   _a       =							18_64
   _a       =							19_05
   _a       =							19_19
   _a       =							24_29
   _a       =							22_08
   _a       =							24_18
   _a       =							23_23
   _a       =							24_07
# @@protoc_insertion_point(module_scope)




