..Running VAE using the following param set:
......scAR mode: scRNAseq
......count model: binomial
......num_input_feature: 15604
......NN_layer1: 150
......NN_layer2: 100
......latent_space: 15
......dropout_prob: 0
......kld_weight: 1e-05
......lr: 0.001
......lr_step_size: 5
......lr_gamma: 0.97
===========================================
Training.....
0%| | 0/400 [00:00<?, ?it/s]
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Input In [12], in <module>
----> 1 scar_obj.train(epochs=400, batch_size=256,)
File /scAR/lib/python3.8/site-packages/torch/distributions/distribution.py:55, in Distribution.__init__(self, batch_shape, event_shape, validate_args)
53 valid = constraint.check(value)
54 if not valid.all():
---> 55 raise ValueError(
56 f"Expected parameter {param} "
57 f"({type(value).__name__} of shape {tuple(value.shape)}) "
58 f"of distribution {repr(self)} "
59 f"to satisfy the constraint {repr(constraint)}, "
60 f"but found invalid values:\n{value}"
61 )
62 if not constraint.check(getattr(self, param)).all():
63 raise ValueError("The parameter {} has invalid values".format(param))
ValueError: Expected parameter loc (Tensor of shape (256, 15)) of distribution Normal(loc: torch.Size([256, 15]), scale: torch.Size([256, 15])) to satisfy the constraint Real(), but found invalid values:
tensor([[nan, nan, nan, ..., nan, nan, nan],
[nan, nan, nan, ..., nan, nan, nan],
[nan, nan, nan, ..., nan, nan, nan],
...,
[nan, nan, nan, ..., nan, nan, nan],
[nan, nan, nan, ..., nan, nan, nan],
[nan, nan, nan, ..., nan, nan, nan]], device='cuda:0',
grad_fn=<AddmmBackward0>)
I have also tried running scAR on my CITEseq data and at least so far the model is training. Perhaps there's something wrong with my RNA count matrix, which I feel quite unlikely.
I am happy to provide further information should you need it. Thanks in advance.