Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix typos #901

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def create_from_metadata_info(
return cls.create_from_metadata(
model_buffer,
model_metadata=general_md.create_metadata(),
input_metadata=input_md.create_input_tesnor_metadata(),
input_metadata=input_md.create_input_tensor_metadata(),
output_metadata=[output_md.create_metadata()],
associated_files=[
file.file_path for file in output_md.associated_files
Expand Down Expand Up @@ -108,7 +108,7 @@ def create_for_inference(
Args:
model_buffer: valid buffer of the model file.
tokenizer_md: information of the tokenizer used to process the input
string, if any. Supported tokenziers are: `BertTokenizer` [1] and
string, if any. Supported tokenizers are: `BertTokenizer` [1] and
`SentencePieceTokenizer` [2]. If the tokenizer is `RegexTokenizer`
[3], refer to `nl_classifier.MetadataWriter`.
[1]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -789,8 +789,8 @@ def __init__(self,

self._tokenizer_md = tokenizer_md

def create_input_tesnor_metadata(self) -> List[_metadata_fb.TensorMetadataT]:
"""Creates the input metadata for the three input tesnors."""
def create_input_tensor_metadata(self) -> List[_metadata_fb.TensorMetadataT]:
"""Creates the input metadata for the three input tensors."""
# The order of the three input tensors may vary with each model conversion.
# We need to order the input metadata according to the tensor order in the
# model.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ def __init__(self, channels: int, sampling_rate: int,
raise sd_error

if channels <= 0:
raise ValueError('channels must be postive.')
raise ValueError('channels must be positive.')
if sampling_rate <= 0:
raise ValueError('sampling_rate must be postive.')
raise ValueError('sampling_rate must be positive.')
if buffer_size <= 0:
raise ValueError('buffer_size must be postive.')
raise ValueError('buffer_size must be positive.')

self._audio_buffer = []
self._buffer_size = buffer_size
Expand Down