コード例 #1
0
import tensorflow as tf
# from data_provider2 import get_split
from tf_utils import start_interactive_session, set_gpu
from rnn_models import RNNplusModel
import numpy as np

set_gpu(5)

options = {
    'data_root_dir': "/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_lrs",
# "/home/michaeltrs/Projects/audio23d/data",
#"/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_clean",  #
    'split_name': "devel",  # 'devel',
    'is_training' : False,
    'data_in': 'melf',  # mfcc, melf, melf_2d
    'max_seq_len': -20,
    'use_rmse': False,
    'batch_size': 128,   # number of examples in queue either for training or inference
    #'reverse_time': False,
    #'shuffle': False,
    #'random_crop': False,
    #'standardize_inputs_and_labels': True,
    'mfcc_num_features': 20,  # 20,
    'raw_audio_num_features': 533,  # 256,
    'num_classes': 28,  # number of output classes 29 = |a-z, " ", <sos>, <eos>|
    'max_out_len_multiplier': 1.0,  # max_out_len = max_out_len_multiplier * max_in_len

    'mfcc_gaussian_noise_std': 0.0,  # 0.05,
    'label_gaussian_noise_std':0.0,

    'has_encoder': True,
コード例 #2
0
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

from collections import defaultdict

from transformer_model import SelfAttentionEncoder
from tf_utils import start_interactive_session, set_gpu

set_gpu(7)

options = defaultdict(
    lambda: None,  # Set default value to None.
    # Input params
    #default_batch_size=2,  # Maximum number of tokens per batch of examples.
    max_length=50,  # Maximum number of tokens per example.
    # Model params
    initializer_gain=1.0,  # Used in trainable variable initialization.
    vocab_size=28,  # Number of tokens defined in the vocabulary file.
    hidden_size=128,  # Model dimension in the hidden layers.
    num_hidden_layers=3,  # Number of layers in the encoder and decoder stacks.
    num_heads=4,  # Number of heads to use in multi-headed attention.
    filter_size=256,  # Inner layer dimension in the feedforward network.
    # Dropout values (only used when training)
    layer_postprocess_dropout=0.1,
    attention_dropout=0.1,
    relu_dropout=0.1,

    ##################################################
    data_root_dir=
    "/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_clean",  # enhanced",
コード例 #3
0
import tensorflow as tf
# from data_provider2 import get_split
from tf_utils import start_interactive_session, set_gpu
from mixed_seq_models import CNNRNNModel3
import numpy as np

set_gpu(0)

options = {
    'data_root_dir':
    "/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_dtw_antonio",
    # "/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_dtwN",
    # "/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_lrs",
    # "/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_clean",
    'is_training': True,
    'data_in': 'melf',  # mcc, melf, melf_2d
    'split_name': 'train',
    'batch_size':
    20,  # number of examples in queue either for training or inference
    'random_crop': False,
    'mfcc_num_features': 20,  # 20,
    'raw_audio_num_features': 533,  # 256,
    'num_classes':
    28,  # number of output classes 29 = |a-z, " ", <sos>, <eos>|

    #'1dcnn_features_dims': [256, 256, 256],
    'batch_norm': True,
    'has_decoder': True,
    'decoder_num_layers': 1,  # number of hidden layers in decoder lstm
    'residual_decoder': False,  # 
    'decoder_num_hidden': 256,  # number of hidden units in decoder lstm
コード例 #4
0
import tensorflow as tf
# from data_provider2 import get_split
from tf_utils import start_interactive_session, set_gpu
from rnn_seq2seq_models import RNNSeq2SeqModel
import numpy as np

set_gpu(-1)


options = {
    'data_root_dir': '/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_dtwN',
# "/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_lrs",
# "/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_clean",

    'is_training' : False,
    'data_in': 'melf',  # mfcc, melf, melf_2d
    #'max_seq_len': -20,
    'split_name': 'devel',
    #'data_in': 'mfcc',  # mfcc, melf, melf_2d
    #'use_rmse': False,
    'batch_size': 1,   # number of examples in queue either for training or inference
    #'reverse_time': False,
    #'shuffle': True,
    'random_crop': False,
    #'standardize_inputs_and_labels': True,
    'mfcc_num_features': 20,  # 20,
    'raw_audio_num_features': 533,  # 256,
    'num_classes': 28,  # number of output classes 29 = |a-z, " ", <sos>, <eos>|
    #'max_out_len_multiplier': 1.0,  # max_out_len = max_out_len_multiplier * max_in_len
    
    #'mfcc_gaussian_noise_std': 0.0,  # 0.05,
コード例 #5
0
from cnn_models import DenseNet1D
from tf_utils import start_interactive_session, set_gpu
import numpy as np

set_gpu(1)

options = {
    'data_root_dir': "/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_lrs",
# "/home/michaeltrs/Projects/audio23d/data",
# "/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_lrs",
# ,  # "/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_clean",  # enhanced",

    'is_training' : True,
    'split_name': "train",  # ""train",  # 'devel',
    'data_in': 'mfcc',  # mfcc, melf, melf_2d
    'max_seq_len': 10,
    # 'use_rmse': False,
    'batch_size': 64,   # number of examples in queue either for training or inference
    # 'reverse_time': False,
    # 'shuffle': True,
    'random_crop': False,
    # 'standardize_inputs_and_labels': False,
    'mfcc_num_features': 20,  # 20,
    'raw_audio_num_features': 533,  # 256,
    'num_classes': 28,  # number of output classes 29 = |a-z, " ", <sos>, <eos>|
    # 'max_out_len_multiplier': 1.0,  # max_out_len = max_out_len_multiplier * max_in_len
    'growth_rate': 20,
    'num_layers' : 6,
    'final_layer_dim': 64,

    'loss_fun': "concordance_cc",
コード例 #6
0
import tensorflow as tf
# from data_provider2 import get_split
from tf_utils import start_interactive_session, set_gpu
from mixed_seq2seq_models import CNNRNNSeq2SeqModel
import numpy as np

<<<<<<< HEAD
set_gpu(2)

options = {
    'data_root_dir': "/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_dtw_antonio",
# "/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_dtwN",
=======
set_gpu(-1)

options = {
    'data_root_dir': '/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_dtwN',
>>>>>>> f798981d5c303deabd8107e5086cbc23a1985d2f
# "/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_lrs",
# "/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_clean",

    'is_training' : False,
<<<<<<< HEAD
    'data_in': 'melf',  # mcc, melf, melf_2d
    'split_name': 'devel',
    'batch_size': 1,   # number of examples in queue either for training or inference
    'random_crop': False,
=======
    'data_in': 'mfcc',  # mcc, melf, melf_2d
    #'max_seq_len': -20,
    'split_name': 'train',  # 'devel',
コード例 #7
0
import tensorflow as tf
# from data_provider2 import get_split
from tf_utils import start_interactive_session, set_gpu
from mixed_seq_models import CNNRNNModel
import numpy as np

set_gpu(2)

options = {
    'data_root_dir': "/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_dtw_antonio",
# "/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_dtwN",
# "/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_lrs",
# "/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_clean",

    'is_training' : True,
    'data_in': 'melf',  # mcc, melf, melf_2d
    'split_name': 'train',
    'batch_size': 64,   # number of examples in queue either for training or inference
    'random_crop': True,
    'mfcc_num_features': 20,  # 20,
    'raw_audio_num_features': 533,  # 256,
    'num_classes': 28,  # number of output classes 29 = |a-z, " ", <sos>, <eos>|
    
    '1dcnn_features_dims': [256, 256, 256],
    
    'has_decoder': True,
    'decoder_num_layers': 1,  # number of hidden layers in decoder lstm
    'residual_decoder': True,  # 
    'decoder_num_hidden': 256,  # number of hidden units in decoder lstm
    'decoder_layer_norm': True,
    'decoder_dropout_keep_prob': 1.0,
コード例 #8
0
from cnn_models import CNNModel
from tf_utils import start_interactive_session, set_gpu
import numpy as np
import tensorflow as tf

set_gpu(3)

options = {
    'data_root_dir': "/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_dtw_antonio",
# "/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_dtwN",
# "/home/michaeltrs/Projects/audio23d/data",
# "/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_clean",
# "/vol/atlas/homes/pt511/db/audio_to_3d/tf_records_lrs",
    'split_name': "devel",  # 'devel',
    'is_training' : False,
    'data_in': 'melf',  # mfcc, melf, melf_2d
    'batch_size': 1,   # number of examples in queue either for training or inference
    'random_crop': False,
    'mfcc_num_features': 20,  # 20,
    'raw_audio_num_features': 533,  # 256,
    'num_classes': 28,  # number of output classes 29 = |a-z, " ", <sos>, <eos>|

    'has_encoder': True,
    '1dcnn_features_dims': [256, 256, 256],

    'loss_fun': "concordance_cc",
    'reg_constant': 0.000,
    'max_grad_norm': 10.0,
    'num_epochs': 100,  # number of epochs over dataset for training
    'start_epoch': 1,  # epoch to start
    'reset_global_step': True,