Skip to content

Parameters can't be changed #19

@Taikakim

Description

@Taikakim

I've tried changing the parameters in the parameters.json file in the model directory and running the training again. The missing features are now added, but training can't start and the model is rendered nonfunctional. Here's the output for example for a paranmeter file like this. It would be nice to have a short piece in the documentation about these parameters. I guess they should be extra controlled variables for the autoencoder, against which it can test it's function? The RNN, if turned on, created a functional model though, altough I've yet to see how the output differs from the usual:

{
  "audio": {
    "dataset_file": "datasets/Perc-AVP2_train.pkl",
    "dataset_test_file": "datasets/Perc-AVP2_valid.pkl",
    "N_FFT": 1024,
    "HOP_LENGTH": 256,
    "SAMPLING_RATE": 16000,
    "MELSPEC_BANDS": 128,
    "USE_SPEC": true,
    "USE_DELTA": false,
    "USE_DELTADELTA": false,
    "USE_MFCC": true,
    "N_MFCC": 18,
    "USE_MFCC_DELTA": false,
    "USE_MFCC_DELTADELTA": false,
    "USE_FLUCT": true,
    "MASK_FLUCT": false,
    "SPECTRAL_CONTRACTION": true,
    "SC_THRESHOLD": 0.1,
    "USE_SC": true,
    "SPECTRAL_FLATNESS": false,
    "SF_THRESHOLD": 0.6,
    "USE_SF": true,
    "USE_HPSS": true
  },
  "model": {
    "sample_sec": 2,
    "sample_overlap": 0,
    "offset_initial": 0,
    "offset_final": 0,
    "single_slice_audio": true,
    "dim_latent": 64,
    "cells_hidden": 512,
    "conv_channels": [
      32,
      64,
      32,
      32
    ],
    "max_pooling": [
      [
        4,
        4
      ],
      [
        2,
        2
      ],
      [
        2,
        4
      ],
      [
        2,
        2
      ]
    ],
    "deconv_shape": [
      [
        1,
        15,
        14,
        32
      ],
      [
        1,
        31,
        31,
        64
      ],
      [
        1,
        63,
        62,
        32
      ],
      [
        1,
        128,
        125,
        1
      ]
    ],
    "iaf_flow_length": 5,
    "dim_autoregressive_nl": 64,
    "initial_s_offset": 1.0,
    "predictor_units": [],
    "dropout_keep_prob": 0.75,
    "rnn_decoder": false,
    "rnn_highway": false,
    "feature_normalization": false
  }
}

I got this output (I cut out the gazillion training steps)

:~/Downloads/SampleVAE-master$ python3.7 train.py --logdir model-AVP2 --dataset Perc-AVP2
/home/kim/.local/lib/python3.7/site-packages/librosa/util/decorators.py:9: NumbaDeprecationWarning: An import was requested from a module that has moved location.
Import requested from: 'numba.decorators', please update to use 'numba.core.decorators' or pin to Numba version 0.48.0. This alias will not be present in Numba version 0.50.0.
  from numba.decorators import jit as optional_jit
/home/kim/.local/lib/python3.7/site-packages/librosa/util/decorators.py:9: NumbaDeprecationWarning: An import was requested from a module that has moved location.
Import of 'jit' requested from: 'numba.decorators', please update to use 'numba.core.decorators' or pin to Numba version 0.48.0. This alias will not be present in Numba version 0.50.0.
  from numba.decorators import jit as optional_jit
Loading existing parameters.
model-AVP2/params.json
Loading dataset.
Creating new feature directory: ./features/features_1604008868.
Writing parameter file.
  0%|                                                                                                                                                         | 0/104443 [00:00<?, ?it/s][0/104443] Calculating missing features for Prc017-LoSlap-63.
  0%|                                                                                                                                              | 1/104443 [00:00<14:23:33,  2.02it/s][1/104443] Calculating missing features for DM-TOM 379.
[2/104443] Calculating missing features for 06xx.
.....
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11605/11605 [29:10<00:00,  6.63it/s]
Features complete.
Generating data index.
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11605/11605 [00:02<00:00, 4992.58it/s]
Total amount of data:  11605
Num classes:  []
WARNING:tensorflow:From train.py:208: to_float (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
Creating model.

WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
  * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
  * https://github.com/tensorflow/addons
If you depend on functionality not listed there, please file an issue.

WARNING:tensorflow:From /home/kim/.local/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
Model created.
Setting up loss.
Traceback (most recent call last):
  File "/home/kim/.local/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 1659, in _create_c_op
    c_op = c_api.TF_FinishOperation(op_desc)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Dimension size must be evenly divisible by 1568 but is 315392 for 'vae_1/Reshape' (op: 'Reshape') with input shapes: [64,22,7,32], [2] and with input tensors computed as partial shapes: input[1] = [?,1568].

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "train.py", line 447, in <module>
    main()
  File "train.py", line 233, in main
    loss, accuracy = net.loss(spec_batch, truth_batch, beta=args.beta)
  File "/home/kim/Downloads/SampleVAE-master/model_iaf.py", line 624, in loss
    output, encoder_mu, encoder_logvar, encoder_std, epsilon, z, nf_sigma, y_prob_list, y_logprob_list = self._create_network(input_batch)
  File "/home/kim/Downloads/SampleVAE-master/model_iaf.py", line 356, in _create_network
    encoder_hidden = tf.reshape(encoder_hidden, [-1, self.conv_out_units])
  File "/home/kim/.local/lib/python3.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 7179, in reshape
    "Reshape", tensor=tensor, shape=shape, name=name)
  File "/home/kim/.local/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py", line 788, in _apply_op_helper
    op_def=op_def)
  File "/home/kim/.local/lib/python3.7/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func
    return func(*args, **kwargs)
  File "/home/kim/.local/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 3300, in create_op
    op_def=op_def)
  File "/home/kim/.local/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 1823, in __init__
    control_input_ops)
  File "/home/kim/.local/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 1662, in _create_c_op
    raise ValueError(str(e))
ValueError: Dimension size must be evenly divisible by 1568 but is 315392 for 'vae_1/Reshape' (op: 'Reshape') with input shapes: [64,22,7,32], [2] and with input tensors computed as partial shapes: input[1] = [?,1568].
:~/Downloads/SampleVAE-master$ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions