Comments (3)
Hi,
Could you provide more details about which function of which file you are changing?
from wgansing.
Hi,
the change file is 'modules_tf.py'.
The code i added is below.
output = encoder_decoder_archi_gan(inputs, is_train)
output = tf.tanh(tf.layers.batch_normalization(tf.layers.dense(output, config.output_features, name = "Fu_F", kernel_initializer=tf.random_normal_initializer(stddev=0.02)), training = is_train, name = "bn_fu_out"))
output = tf.squeeze(output)
# add lstm layer
lstm_cell = tf.contrib.rnn.BasicLSTMCell(64, forget_bias=1.0, state_is_tuple=True)
init_state = lstm_cell.zero_state(batch_size=config.batch_size, dtype=tf.float32)
lstm_out, final_state = tf.nn.dynamic_rnn(lstm_cell, output, initial_state=init_state, time_major=False)
lstm_out = tf.tanh(tf.layers.batch_normalization(tf.layers.dense(lstm_out, config.output_features, name = "T_GRU", kernel_initializer=tf.random_normal_initializer(stddev=0.02)), training=is_train, name = "gru_out"))
return lstm_out
from wgansing.
I would define an LSTM function as follows:
def bi_static_stacked_RNN(x, scope='RNN', lstm_size = config.lstm_size):
"""
Input and output in batch major format
"""
with tf.variable_scope(scope):
x = tf.unstack(x, config.max_phr_len, 1)
output = x
num_layer = 2
# for n in range(num_layer):
lstm_fw = tf.nn.rnn_cell.LSTMCell(lstm_size, state_is_tuple=True)
lstm_bw = tf.nn.rnn_cell.LSTMCell(lstm_size, state_is_tuple=True)
_initial_state_fw = lstm_fw.zero_state(config.batch_size, tf.float32)
_initial_state_bw = lstm_bw.zero_state(config.batch_size, tf.float32)
output, _state1, _state2 = tf.contrib.rnn.static_bidirectional_rnn(lstm_fw, lstm_bw, output,
initial_state_fw=_initial_state_fw,
initial_state_bw=_initial_state_bw,
scope='BLSTM_'+scope)
output = tf.stack(output)
output_fw = output[0]
output_bw = output[1]
output = tf.transpose(output, [1,0,2])
return output
And then pass the output to it as:
output = bi_static_stacked_RNN(output, scope = "scope")
from wgansing.
Related Issues (20)
- I want to generate from label file HOT 1
- loss is nan
- language independent HOT 1
- ERROR: Failed building wheel for h5py HOT 1
- Is singers independent?
- Small but important problems of this repo. HOT 5
- Redondant call to PyWorld
- variable max_phr_len in config.py HOT 1
- Potential typo in code HOT 2
- Building a extended singing corpus
- Performance bottleneck (not from model) HOT 2
- What should the input file look like when using in test mode? HOT 1
- About the HDF5 and the audio generation. HOT 3
- dataset from TROMPA
- Muffled Singing Voice
- Two problems about this repo.
- Syntax Error
- Encounter error while synthesizing: "a mismatch between the current graph and the graph" HOT 1
- dataset can't download HOT 1
- Can not download the dataset HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wgansing.