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

the generation results seems not linearly #24

Open
lxn179208 opened this issue Nov 9, 2018 · 0 comments
Open

the generation results seems not linearly #24

lxn179208 opened this issue Nov 9, 2018 · 0 comments

Comments

@lxn179208
Copy link

lxn179208 commented Nov 9, 2018

Without Training, I can run generate.run directly, with dilation_num = 4, generate cost 19s, dilation_num = 8, cost 29s, dilation_num = 14, cost 43s, so the results seems not linearly?

from time import time

from wavenet.utils import make_batch
from wavenet.models import Model, Generator

#from IPython.display import Audio


inputs, targets = make_batch('assets/voice.wav')
num_time_samples = inputs.shape[1]
num_channels = 1
gpu_fraction = 1.0

model = Model(num_time_samples=num_time_samples,
              num_channels=num_channels,
              gpu_fraction=gpu_fraction)

#Audio(inputs.reshape(inputs.shape[1]), rate=44100)

tic = time()
#model.train(inputs, targets)
toc = time()

print('Training took {} seconds.'.format(toc-tic))

generator = Generator(model)

# Get first sample of input
input_ = inputs[:, 0:1, 0]

tic = time()
predictions = generator.run(input_, 32000)
toc = time()
print('Generating took {} seconds.'.format(toc-tic))

#Audio(predictions, rate=44100)

layers=4

$python test.py
WARNING:tensorflow:From /home/xianning.lu/sing/tf-no-mkl/lib/python2.7/site-packages/tensorflow/python/util/deprecation.py:553: calling conv1d (from tensorflow.python.ops.nn_ops) with data_format=NHWC is deprecated and will be removed in a future version.
Instructions for updating:
`NHWC` for data_format is deprecated, use `NWC` instead
2018-11-09 18:17:04.603404: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
WARNING:tensorflow:From /home/xianning.lu/sing/tf-no-mkl/lib/python2.7/site-packages/tensorflow/python/util/tf_should_use.py:189: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use `tf.global_variables_initializer` instead.
Training took 0.0 seconds.
Make Generator.
Generating took 19.5070331097 seconds.

layers=8

$python test.py
WARNING:tensorflow:From /home/xianning.lu/sing/tf-no-mkl/lib/python2.7/site-packages/tensorflow/python/util/deprecation.py:553: calling conv1d (from tensorflow.python.ops.nn_ops) with data_format=NHWC is deprecated and will be removed in a future version.
Instructions for updating:
`NHWC` for data_format is deprecated, use `NWC` instead
2018-11-09 18:17:51.435269: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
WARNING:tensorflow:From /home/xianning.lu/sing/tf-no-mkl/lib/python2.7/site-packages/tensorflow/python/util/tf_should_use.py:189: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use `tf.global_variables_initializer` instead.
Training took 0.0 seconds.
Make Generator.
Generating took 29.0180389881 seconds.

layers=14

$python test.py
WARNING:tensorflow:From /home/xianning.lu/sing/tf-no-mkl/lib/python2.7/site-packages/tensorflow/python/util/deprecation.py:553: calling conv1d (from tensorflow.python.ops.nn_ops) with data_format=NHWC is deprecated and will be removed in a future version.
Instructions for updating:
`NHWC` for data_format is deprecated, use `NWC` instead
2018-11-09 18:15:56.114761: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
WARNING:tensorflow:From /home/xianning.lu/sing/tf-no-mkl/lib/python2.7/site-packages/tensorflow/python/util/tf_should_use.py:189: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use `tf.global_variables_initializer` instead.
Training took 0.0 seconds.
Make Generator.
Generating took 43.2759749889 seconds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant