austenlamacraft / audio-mps Goto Github PK
View Code? Open in Web Editor NEWAudio Synthesis with Matrix Product States
Audio Synthesis with Matrix Product States
self.r_reg * tf.real(tf.reduce_sum(tf.conj(self.R)*self.R))
Why reduce_mean
rather than reduce_sum
? You are choosing the relative weight of the main loss and the regularization. Taking the view that the whole thing is is a log probability suggests to me that it should be reduce_mean
. What do you think?
Line 158. num_samples = tf.size(signal)
. It looks to me like tf.size gives the total number of elements, whereas you want the batch size signal.shape[0]
.
Line 159 and 163. Are you sure this tile
and reshape
is right? Did you check it? I think tf.stack
is what you want here, as that adds an index.
Line 152. tf.log(self._expectation_rho(rho))
. Why isn't this tf.log(tf.trace(rho))
?
Smaller things:
Lines 25-39. Are all the if
s necessary? You supply the matrix as an initializer. If it's None
, it does nothing.
[self.rank_rho_0, self.bond_d]
is the same as 2*[self.rank_rho_0]
self.W
, self.Wx
, self.Wy
are not used for anything, only to build self.rho_0
. Put them in another method, say _init_rho_0
.
Line 173. In exp = tf.trace(tf.einsum('ab,cbd->cad', x, rho))
the tf.trace
is redundant. Do it all with einsum
.
_inc_loss_rho
doesn't use signal
argument (PyCharm would tell you that!).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.