You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/usr/local/lib/python3.7/dist-packages/ydata_synthetic/synthesizers/gan.py in init(self, model_parameters)
52 pass
53 #Validate the provided model parameters
---> 54 if model_parameters.betas is not None:
55 assert len(model_parameters.betas) == 2, "Please provide the betas information as a tuple."
56
AttributeError: 'tuple' object has no attribute 'betas'
When I run the above code, I am getting attribute error. I tried giving as a list, still the same error persists. I noticed the message "Please provide the betas information as a tuple." How do I fix this error? Please help me.
The text was updated successfully, but these errors were encountered:
training configuration
noise_dim = 32
dim = 128
batch_size = 16
log_step = 200
epochs = 10000+1
learning_rate = 5e-5
beta_1 = 0.5
beta_2 = 0.9
betas = (beta_1, beta_2)
models_dir = 'my_model_datasetB/'
data_dim = data_train.shape[1]
print('Shape of data: ', data_train.shape)
#Define the GAN and training parameters
#'batch_size', 'lr', 'betas', 'layers_dim', 'noise_dim','n_cols', 'seq_len', 'condition', 'n_critic', 'n_features', 'tau_gs'
gan_args = (batch_size, learning_rate, betas, noise_dim, data_dim, dim)
train_args = ('', epochs, log_step)
#Training the GAN model chosen: Vanilla GAN, CGAN, DCGAN, etc.
synthesizer = WGAN_GP(gan_args, n_critic=2)
synthesizer.train(data_train, train_args)
AttributeError Traceback (most recent call last)
in
1 #Training the GAN model chosen: Vanilla GAN, CGAN, DCGAN, etc.
----> 2 synthesizer = WGAN_GP(gan_args, betas)
3 synthesizer.train(data_train, train_args)
2 frames
/usr/local/lib/python3.7/dist-packages/ydata_synthetic/synthesizers/regular/wgangp/model.py in init(self, model_parameters, n_critic, gradient_penalty_weight)
24 self.n_critic = n_critic
25 self.gradient_penalty_weight = gradient_penalty_weight
---> 26 super().init(model_parameters)
27
28 def define_gan(self, activation_info: Optional[NamedTuple] = None):
/usr/local/lib/python3.7/dist-packages/typeguard/init.py in wrapper(*args, **kwargs)
1031 memo = _CallMemo(python_func, _localns, args=args, kwargs=kwargs)
1032 check_argument_types(memo)
-> 1033 retval = func(*args, **kwargs)
1034 try:
1035 check_return_type(retval, memo)
/usr/local/lib/python3.7/dist-packages/ydata_synthetic/synthesizers/gan.py in init(self, model_parameters)
52 pass
53 #Validate the provided model parameters
---> 54 if model_parameters.betas is not None:
55 assert len(model_parameters.betas) == 2, "Please provide the betas information as a tuple."
56
AttributeError: 'tuple' object has no attribute 'betas'
When I run the above code, I am getting attribute error. I tried giving as a list, still the same error persists. I noticed the message "Please provide the betas information as a tuple." How do I fix this error? Please help me.
The text was updated successfully, but these errors were encountered: