I am a newbie programmer in pytorch. I am trying to convert this code from Approximate Inference for Deep Latent Gaussian Mixtures paper written in tensorflow to pytorch. I have a difficult time finding out how I can translate tf.placeholder
syntax from tensorflow to pytorch explicitly for this part of the aforementioned code:
line 84 of gaussMMVAE_collapsed.py
script
class GaussMMVAE(object):
def __init__(self, hyperParams):
self.X = tf.placeholder("float", [None, hyperParams['input_d']])
self.prior = hyperParams['prior']
self.K = hyperParams['K']
self.encoder_params = self.init_encoder(hyperParams)
self.decoder_params = self.init_decoder(hyperParams)
I have read many posts that there isn’t any one to one function for placeholder but given the above example code, I reckon there should be a case by case solution. Thanks in advance for any instructive suggestion.