# You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import os from tqdm import tqdm import argparse from tensorflow_asr.utils import env_util, file_util env_util.setup_environment() import tensorflow as tf DEFAULT_YAML = os.path.join(os.path.abspath(os.path.dirname(__file__)), "config.yml") tf.keras.backend.clear_session() parser = argparse.ArgumentParser(prog="Jasper Testing") parser.add_argument("--config", type=str, default=DEFAULT_YAML, help="The file path of model configuration file") parser.add_argument("--saved",
import os import argparse from tensorflow_asr.utils.env_util import setup_environment, setup_strategy logger = setup_environment() import tensorflow as tf DEFAULT_YAML = os.path.join(os.path.abspath(os.path.dirname(__file__)), "config.yml") tf.keras.backend.clear_session() parser = argparse.ArgumentParser(prog="Vocab Training with SentencePiece") parser.add_argument("--config", type=str, default=DEFAULT_YAML, help="The file path of model configuration file") parser.add_argument("--devices", type=int, nargs="*", default=[0], help="Devices' ids to apply distributed training") args = parser.parse_args() strategy = setup_strategy(args.devices) from tensorflow_asr.configs.config import Config from tensorflow_asr.featurizers.text_featurizers import SentencePieceFeaturizer
# You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import os import math import argparse from tensorflow_asr.utils import env_util logger = env_util.setup_environment() import tensorflow as tf DEFAULT_YAML = os.path.join(os.path.abspath(os.path.dirname(__file__)), "config.yml") tf.keras.backend.clear_session() parser = argparse.ArgumentParser(prog="Conformer Training") parser.add_argument("--config", type=str, default=DEFAULT_YAML, help="The file path of model configuration file") parser.add_argument("--tfrecords",
import os import argparse from tensorflow_asr.utils.env_util import setup_environment, setup_strategy setup_environment() import tensorflow as tf DEFAULT_YAML = os.path.join(os.path.abspath(os.path.dirname(__file__)), "config.yml") tf.keras.backend.clear_session() parser = argparse.ArgumentParser(prog="Vocab Training with SentencePiece") parser.add_argument("--config", type=str, default=DEFAULT_YAML, help="The file path of model configuration file") parser.add_argument("--devices", type=int, nargs="*", default=[0], help="Devices' ids to apply distributed training") args = parser.parse_args() strategy = setup_strategy(args.devices) from tensorflow_asr.configs.config import Config from tensorflow_asr.featurizers.text_featurizers import SentencePieceFeaturizer