ratschlab / rgan Goto Github PK
View Code? Open in Web Editor NEWRecurrent (conditional) generative adversarial networks for generating real-valued time series data.
Home Page: https://arxiv.org/abs/1706.02633
License: MIT License
Recurrent (conditional) generative adversarial networks for generating real-valued time series data.
Home Page: https://arxiv.org/abs/1706.02633
License: MIT License
Hello @corcra ! I have run 'eICU_synthetic_dataset_generation' on my own data and it's generating pretty good results, while it is getting trained. But I am confused about generating new data after training from the saved parameters. The name of the values in parameters are also very different from parameters saved by running experiment.py. Is there ant code available to generate data from parameters saved while running 'eICU_synthetic_dataset_generation' ?
I clone the code and download the mnist in csv, run python experiment.py --settings_file mnistfull
.
Almost all images generated in experiments/plot are digit as '1' after 250 epoches which seems like mode collapse . Is it a common phenomenon? Or how to avoid it?
Hi,
I'm trying to train the RGAN to reproduce your results on the eICU data. I've got the eICU dataset, but I'm not sure of how you pre-processed/reshaped it?
Would it be possible to share the script for preprocessing eICU data? perhaps also the linux command-line instructions, and the directory structure you need to run in order to get the code training on the data? Also, I tried following your instructions you gave on a similar previous issue about converting the files to hdf5, and I ran into memory errors when I try to do that using the simple to_hdf pandas API. Is there some other more efficient way to do that?
Thank you!
Can anyone help me with visualizing the complete raw signal with the generated signal .
hi @corcra
May I ask what is D_wrong
for? It seems like that it together with variables CS
, D_logit_wrong
are defined but have not been used?
And are CG
and CG
always the same? Should these two merge ? I think it is reasonable that generator and discriminator share the same condition.
Thanks for your great work!
Hello, I am trying to run experiment.py but I am getting this error:
Traceback (most recent call last): File "experiment.py", line 9, in <module> import data_utils File "RGAN/data_utils.py", line 9, in <module> import model File "RGAN/model.py", line 7, in <module> from mod_core_rnn_cell_impl import LSTMCell #modified to allow initializing bias in lstm File "RGAN/mod_core_rnn_cell_impl.py", line 45, in <module> from tensorflow.python.ops.rnn_cell_impl import _RNNCell as RNNCell ImportError: cannot import name '_RNNCell'
Hello :)
I'm a total newb? I got this error when trying to train on MNIST,
(py35_pytorch) ajay@ajay-h8-1170uk:~/PythonProjects/RGAN-master$ python experiment.py --settings_file test
Loading settings from ./experiments/settings/test.txt
Failed to load from .npy, loading from csv
Traceback (most recent call last):
File "/home/ajay/PythonProjects/RGAN-master/data_utils.py", line 206, in mnist
train = np.load('./data/mnist_train.npy')
File "/home/ajay/anaconda3/envs/py35_pytorch/lib/python3.5/site-packages/numpy/lib/npyio.py", line 370, in load
fid = open(file, "rb")
FileNotFoundError: [Errno 2] No such file or directory: './data/mnist_train.npy'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "experiment.py", line 117, in <module>
samples, pdf, labels = data_utils.get_data(settings['data'], data_settings)
File "/home/ajay/PythonProjects/RGAN-master/data_utils.py", line 147, in get_data
samples, labels = load_resized_mnist_0_5(14)
File "/home/ajay/PythonProjects/RGAN-master/data_utils.py", line 233, in load_resized_mnist_0_5
samples, labels = mnist()
File "/home/ajay/PythonProjects/RGAN-master/data_utils.py", line 211, in mnist
train = np.loadtxt(open('./data/mnist_train.csv', 'r'), delimiter=',')
FileNotFoundError: [Errno 2] No such file or directory: './data/mnist_train.csv'
So I got the original MNIST data from mr lecun unzipped it, and tried to convert it to csv
using this script.
Is that the right way to do it?
I though it was OK, then got this weird error?
(py35_pytorch) ajay@ajay-h8-1170uk:~/PythonProjects/RGAN-master$ python experiment.py --settings_file test
Loading settings from ./experiments/settings/test.txt
Loaded mnist from .npy
Resizing...
Generated/loaded 36017 samples from data-type mnist
Splitting labels...
False WGAN_clip
100 hidden_units_g
14 num_signals
False normalise
True learn_scale
0.1 amplitude_low
0.9 amplitude_high
5.0 freq_high
True shuffle
mnist data
False batch_mean
False full_mnist
1.0 freq_low
False wrong_labels
5 D_rounds
28 batch_size
14 num_generated_features
True multivariate_mnist
True one_hot
36017 num_samples
data_load_from
0.1 scale
14 seq_length
0.1 learning_rate
False predict_labels
False WGAN
100 num_epochs
1 max_val
1 kappa
False use_time
5 latent_dim
100 hidden_units_d
15 resample_rate_in_min
test identifier
settings_file
1 G_rounds
6 cond_dim
Saved training data to ./experiments/data/test.data.npy
Traceback (most recent call last):
File "experiment.py", line 197, in <module>
D_loss, G_loss = model.GAN_loss(Z, X, generator_settings, discriminator_settings, kappa, CGAN, CG, CD, CS, wrong_labels=wrong_labels)
File "/home/ajay/PythonProjects/RGAN-master/model.py", line 153, in GAN_loss
D_fake, D_logit_fake = discriminator(G_sample, reuse=True, **discriminator_settings, c=CG)
File "/home/ajay/PythonProjects/RGAN-master/model.py", line 290, in discriminator
inputs=x)
File "/home/ajay/anaconda3/envs/py35_pytorch/lib/python3.5/site-packages/tensorflow/python/ops/rnn.py", line 553, in dynamic_rnn
dtype=dtype)
File "/home/ajay/anaconda3/envs/py35_pytorch/lib/python3.5/site-packages/tensorflow/python/ops/rnn.py", line 720, in _dynamic_rnn_loop
swap_memory=swap_memory)
File "/home/ajay/anaconda3/envs/py35_pytorch/lib/python3.5/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2623, in while_loop
result = context.BuildLoop(cond, body, loop_vars, shape_invariants)
File "/home/ajay/anaconda3/envs/py35_pytorch/lib/python3.5/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2456, in BuildLoop
pred, body, original_loop_vars, loop_vars, shape_invariants)
File "/home/ajay/anaconda3/envs/py35_pytorch/lib/python3.5/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2406, in _BuildLoop
body_result = body(*packed_vars_for_body)
File "/home/ajay/anaconda3/envs/py35_pytorch/lib/python3.5/site-packages/tensorflow/python/ops/rnn.py", line 705, in _time_step
(output, new_state) = call_cell()
File "/home/ajay/anaconda3/envs/py35_pytorch/lib/python3.5/site-packages/tensorflow/python/ops/rnn.py", line 691, in <lambda>
call_cell = lambda: cell(input_t, state)
File "/home/ajay/anaconda3/envs/py35_pytorch/lib/python3.5/site-packages/tensorflow/contrib/rnn/python/ops/core_rnn_cell_impl.py", line 398, in __call__
reuse=self._reuse) as unit_scope:
File "/home/ajay/anaconda3/envs/py35_pytorch/lib/python3.5/contextlib.py", line 59, in __enter__
return next(self.gen)
File "/home/ajay/anaconda3/envs/py35_pytorch/lib/python3.5/site-packages/tensorflow/contrib/rnn/python/ops/core_rnn_cell_impl.py", line 93, in _checked_scope
"the argument reuse=True." % (scope_name, type(cell).__name__))
ValueError: Attempt to have a second RNNCell use the weights of a variable scope that already has weights: 'discriminator/rnn/lstm_cell'; and the cell was not constructed as LSTMCell(..., reuse=True). To share the weights of an RNNCell, simply reuse it in your second calculation, or create a new one with the argument reuse=True.
I also get the same error when I try to use sine
wave data, i.e. try to run
python experiment.py --data sine
Hi, thank you for your codes. And I wonder whether there is a pytorch version of the codes?
HI, guys,
Thanks for your great job!
When I go though your code, I notice that the output of discriminator seemed not to be 0/1 but a 0/1 - matrix? Why is that ? Is it heuristic way?
Thanks a lot.
# from line 316 model.py line
# logit_final = tf.matmul(rnn_outputs[:, -1], W_final_D) + b_final_D
logits = tf.einsum('ijk,km', rnn_outputs, W_out_D) + b_out_D
# rnn_outputs_flat = tf.reshape(rnn_outputs, [-1, hidden_units_d])
# logits = tf.matmul(rnn_outputs_flat, W_out_D) + b_out_D
This is just a heads up to the authors or anyone who is using conditional inputs, but in the current state of things this if statement is being ignored.
model.py line 275
if cond_dim > 0:
assert not c is None
repeated_encoding = tf.stack([c]*seq_length, axis=1)
inputs = tf.concat([x, repeated_encoding], axis=2)
else:
inputs = x
As at model.py line 292, inputs is set to x, rather than being set to inputs.
rnn_outputs, rnn_states = tf.nn.dynamic_rnn(
cell=cell,
dtype=tf.float32,
inputs=x)
Making this small change allowed me to finally train my first conditional model.
Hello, I am trying to run experiment.py but I am getting this error:
FileNotFoundError: [Errno 2] No such file or directory: './experiments/settings/test.txt'
It seems the settings are not included.
I thought I'd share my experience with the MNIST data set and maybe ask some questions along the way. I used the csv version of MNIST. One of the first things I noticed was a problem with the labels. You might be able to train the model with the default settings, but in my case it did not process the labels correctly. So I found one way to fix this is to edit the mnistfull.txt settings file at experiments/settings/mnistfull.txt by changing the value of one_hot to true.
Next you copy your MNIST csv file to experiments/data/ directory. You also have to edit the code a little. Please note that since I did change the code in some of the files, the line numbers might not reflect the github archive. In any case, in line 16 of data_utils.py you want to comment out the imresize import because it is deprecated and not used for these settings. Like so:
#from scipy.misc import imresize
Next you have to fix some paths also in data_utils.py:
Line 303:
train = np.loadtxt(open('./experiments/data/mnist_train.csv', 'r'), delimiter=',')
and line 308:
np.save('./experiments/data/mnist_train.npy', train)
Now something happens when you activate one_hot that detects the 10 labels corresponding to the 10 digits. However, experiments.py is set up to only read 6 or 3 labels. This will be the cond_dim settings variable. You don't have to set it in the settings file because it will automatically write it as 10 when you set one_hot to true. I'm not sure where it does this and it is worth further investigation. Suffice it to say you have to add some code to experiment.py at around line 103. You have to add another elif statement like so:
elif cond_dim == 10:
vis_C[:10] = np.eye(10)
I was also having memory issues so I turned off mmd calculations according to this comment:
#16 (comment)
Finally, you have to fix your print statements. The formatting expects a numerical value for mmd and that_np so look for a try/except block at around line 260 or so (in the archive it's at line 255). Before it you have to check to make sure that_np is initialized with the following code before the try:
try: that_np
except NameError: that_np = None
Yes, that is you add another try before the try block with the print statements. Then you change the except print statement to the following:
print('%d\t%.2f\t%.4f\t%.4f\t%s\t%s\t %s\t %s' % (epoch, t, D_loss_curr, G_loss_curr, mmd2, that_np, pdf_sample, pdf_real))
Basically, just making sure mmd2, that_np, along with pdf_sample and pdf_real are all formatted as strings.
At this point, the model trained and I went for 500 epochs.
Next, you want to generate some if not all of the digits. To do this, I did a couple of things first. In model.py, line 343, I change that line to this:
model_parameters = np.load(load_path, allow_pickle=True).item()
You have to allow_pickle or the parameters stores as npy files will not load.
Next, I wrote a script like so:
import numpy as np
import tensorflow as tf
import pdb
import random
import json
from scipy.stats import mode
import data_utils
import plotting
import model
import utils
import eval
from time import time
from math import floor
from mmd import rbf_mmd2, median_pairwise_distance, mix_rbf_mmd2_and_ratio
print("All imports worked")
tf.logging.set_verbosity(tf.logging.ERROR)
# parse command line arguments, or use defaults
parser = utils.rgan_options_parser()
settings = vars(parser.parse_args())
# if a settings file is specified, it overrides command line arguments/defaults
if settings['settings_file']: settings = utils.load_settings_from_file(settings)
print('Ready to run with settings:')
epoch = 450
num_samples = 10
idx="Test"
seq_length=settings["seq_length"]
labs = np.array([0,1,2,3,4,5,6,7,8,9])
csamples = np.zeros((10,10))
csamples[0][0] = 1
csamples[1][1] = 1
csamples[2][2] = 1
csamples[3][3] = 1
csamples[4][4] = 1
csamples[5][5] = 1
csamples[6][6] = 1
csamples[7][7] = 1
csamples[8][8] = 1
csamples[9][9] = 1
print(csamples)
synth_data = model.sample_trained_model(settings, epoch, num_samples, C_samples=csamples)
plotting.save_mnist_plot_sample(synth_data.reshape(-1, seq_length**2, 1), idx,"epoch450", num_samples, labels=labs)
You run this script just like you run experiment.py as such:
python script.py --settings_file mnistfull
Also, you probably don't need all the import statements. I just copy/pasted from experiment.py.
Basically, your C_samples are the labels you input to the generator to tell it what digits to print. In this case, we are printing all ten digits. However they are formatted as a 10x10 numpy array each row being a digit with each column index indicating which digit it is by setting it to one. So for example if you want to print zero as the first digit, you set row zero column zero to one. If you want to print the third digit as 5 you set row three column five to one. In this case, I set every digit in order so 0,0 is 0, 1,1 is 1 and so on.
Here is an example of my output:
Now the minimum number of digits you can print is four based on how the plotting.py script is written. But you can print out any digit. Say you wanted to print out the digits 5309. You would use the same script as above but change the num_samples variable to 4. Create the csamples array with a shape of (4,10) and construct the array as:
csamples[0][5] = 1
csamples[1][3] = 1
csamples[2][0] = 1
csamples[3][9] = 1
Your output might look like this:
Note this is after 450 epochs.
Well this was my experience with MNIST and this algorithm. Hopefully this will help someone along the way. I am also not clear from a theory perspective what the one_hot value does. Hopefully, I am not invalidating the results by the changes I made to the code.
Thank you.
Was curious what tensorflow version this was compiled in. I have all packaged for python3, and now I'm getting an error message whenI run the sample code in the README.md regarding the test file:
from tensorflow.python.ops.rnn_cell_impl import _RNNCell as RNNCell # Original Implementation
ImportError: cannot import name '_RNNCell'
*Traces this to the mod_core_rnn_cell_impl.py file. This was ran on tensorflow 1.2.1
Can it be used with any time series data. Can iy be used in financial markets What's the format of data it accepts like.. csv and no of example of sample data. Where I find the sample data which is used here.
What are the hyperparameters used for the experiment you present in your paper for sine wave generation? I can't seem to reproduce them.
I'm not quite sure where the model is saved, and if there is a predefined script where I can essentially run a forward pass of the model, and visualize (or have access) to the output vector.
Line 177 in f41731b
The variable D_loss_wrong
is not defined in this code. Is there a solution for this?
Could not find a version that satisfies the requirement tensorflow==1.4.1 (from -r requirements.txt (line 18)) (from versions: )
No matching distribution found for tensorflow==1.4.1 (from -r requirements.txt (line 18)). Help me with this.
I have trained a new RGAN model using MNIST data. What are the steps to generate images from the trained model?
Hi,
When I change the setting file to enable WGAN and WGAN_clip and run the model, it gives the Error:
NameError: name 'clip_disc_weights' is not defined
Should I give clip_disc_weights a value that constraint the weight value of the network?
Thanks !!
Hi,
I'm trying to train the RGAN to reproduce your results from section 5 table 2 of the manuscript. I've got the eICU dataset, but I'm not sure of how you pre-processed/reshaped it - to be honest I'm kind of lost?
Would it be possible to share the linux command-line instructions, and the directory structure you need to run in order to get the code training - pretty please with cherries on top.
Fan Q
Hello,
I want to start using RGAN, but just in first experiment, I got this error:
python experiment.py --settings_file test
File "experiment.py", line 62
G_sample = model.generator(Z, **generator_settings, reuse=True, c=CG)
^
SyntaxError: invalid syntax
Any help?
Getting an error for mnistfull.txt.
Error is in cell = tf.contrib.rnn.LSTMCell(num_units=hidden_units_d,
state_is_tuple=True,
reuse=reuse)
Please let me know the solution.
One more error name 'l2norm_bound' is not defined
Hello everybody,
I am currently trying to convert RGAN to MXNet Gluon.
But I still cannot reproduce the results. So I think there are some issues in my code.
Some parts of the Tensorflow code are still confusing for me. It would be very helpful if you can answer some of my questions.
In the generator line 278 we have :
logits_2d = tf.matmul(rnn_outputs_2d, W_out_G) + b_out_G
and in the discriminator line 317 we have :
logits = tf.einsum('ijk,km', rnn_outputs, W_out_D) + b_out_D
I understand that you are doing a weighted sum and reducing dimensions, but what is the difference between matmul and einsum in this case ?
Are W_out/b_out static tensors ? Or are they evolving during the training phase ?
Can we replace these operations by Dense/Linear layers, they are able to reduce dims after all
Thank you
Hi guys!
Is it possible for you to add some more detailed documentation on the plotting.py file?
Also i wanted to ask if i just wanted to recreate your experiment with the mnist dataset,
which of the functions in plotting.py would be used to help visualize the results just for the mnist experiment? Thank you.
Hi,
I got this error, when I try to run the experiment by ''python experiment.py --setting_file test".
And this may be caused by "python<3.7".
Do you have a requirement.txt under "python>=3.7" envirment ?
Or can you tell me how to solve this problem under "python==3.6.x" envirment?
Hello, I am attempting to run this code:
python3 experiment.py --settings_file test
But I am running out of memory (OOM error):
2017-12-09 23:17:18.540786: W tensorflow/core/common_runtime/bfc_allocator.cc:277] ***************************************************************************************************x
2017-12-09 23:17:18.540796: W tensorflow/core/framework/op_kernel.cc:1192] Resource exhausted: OOM when allocating tensor with shape[3988,3988]
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1323, in _do_call
return fn(*args)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1302, in _run_fn
status, run_metadata)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/errors_impl.py", line 473, in __exit__
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with shape[3988,3988]
[[Node: mul_790 = Mul[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"](Neg_102, add_467)]]
[[Node: truediv_233/_165 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_216_truediv_233", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]()]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "experiment.py", line 221, in <module>
mmd2, that_np = sess.run(mix_rbf_mmd2_and_ratio(eval_test_real, eval_test_sample,biased=False, sigmas=sigma))
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 889, in run
run_metadata_ptr)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1120, in _run
feed_dict_tensor, options, run_metadata)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1317, in _do_run
options, run_metadata)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1336, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with shape[3988,3988]
[[Node: mul_790 = Mul[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"](Neg_102, add_467)]]
[[Node: truediv_233/_165 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_216_truediv_233", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]()]]
Caused by op 'mul_790', defined at:
File "experiment.py", line 221, in <module>
mmd2, that_np = sess.run(mix_rbf_mmd2_and_ratio(eval_test_real, eval_test_sample,biased=False, sigmas=sigma))
File "/home/jchook/dev/RGAN/mmd.py", line 71, in mix_rbf_mmd2_and_ratio
K_XX, K_XY, K_YY, d = _mix_rbf_kernel(X, Y, sigmas, wts)
File "/home/jchook/dev/RGAN/mmd.py", line 52, in _mix_rbf_kernel
K_YY += wt * tf.exp(-gamma * (-2 * YY + c(Y_sqnorms) + r(Y_sqnorms)))
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/math_ops.py", line 894, in binary_op_wrapper
return func(x, y, name=name)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/math_ops.py", line 1117, in _mul_dispatch
return gen_math_ops._mul(x, y, name=name)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/gen_math_ops.py", line 2726, in _mul
"Mul", x=x, y=y, name=name)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 2956, in create_op
op_def=op_def)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 1470, in __init__
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
ResourceExhaustedError (see above for traceback): OOM when allocating tensor with shape[3988,3988]
[[Node: mul_790 = Mul[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"](Neg_102, add_467)]]
[[Node: truediv_233/_165 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_216_truediv_233", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]()]]
What are the minimum GPU memory requirements?
Was curious if there is a README file. The code looks very well commented, but not really sure where to start looking, or where the main function is!
I believe your scale_data()
is scaling horizontally across the signals rather than down the time series for each of signal itself. I used:
def scale_linear_bycolumn(rawpoints, high=1.0, low=-1.0):
mins = np.min(rawpoints, axis=0)
maxs = np.max(rawpoints, axis=0)
rng = maxs - mins
return high - (((high - low) * (maxs - rawpoints)) / rng)
I think it would make sense to scale the whole signals's timeseries (down the column) rather than across at each time step. I noticed this when I was inputing signals with different amplitudes and the values starting to fill as NaN because it was being scaled across signals at a timestep rather than down the signal to all the values for that signal's time series.
Thanks for the great job!
However when i run the code i got error message:
FileNotFoundError: [Errno 2] No such file or directory: './experiments/traces/test.trace.txt'
so where is the test.trace.txt ?
hi,
I am going to use do the eICU dataset experiment from section 5 of the manuscript.As i have not got the eICU dataset , i don't know 7 labels in your code. So,could you show me the details of those 7 lables.
By the way , could you offer a brief introduction about the eICUdataset in your manuscript?
Thank s a lot.
Hi! I am using RGAN; the training is successfully going on with my dataset. It is also generating good samples but after some epochs, the generator loss is again increasing and has noisy samples. Again after some epochs, it produces good results. I do know why! Can anyone help me?
Traceback (most recent call last):
File "experiment.py", line 258, in
print('%d\t%.2f\t%.4f\t%.4f\t%.5f\t%.0f\t %s\t %s' % (epoch, t, D_loss_curr, G_loss_curr, mmd2, that_np, pdf_sample, pdf_real))
TypeError: must be real number, not str
I am getting this error while running experiment.py on my data with "num_samples": 869,
"seq_length": 300,
"num_signals": 9.
After looking over the code it seems like the conditional part of the RC-GAN is more or less something like a one-hot vector encoded switch that can choose what signals or time-series data I want to generate from a family of distributions: See: https://github.com/ratschlab/RGAN/blob/master/model.py#L36
I am wondering if the model would still theoretically work under a sequence-to-sequence like fashion with input real values and output real values, or what is the limitation (if any) in the current implementation, that prevents this to be a natural extension.
I want to understand what's the role of this function in the code. Thanks
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.