The paper mentioned that the baseline is built by the "hierarchical network" with a linear regression after taking the input. But, I only found that the baseline implementation is just a linear mapping from the generator encoder hidden representation of the sentence to a scalar, which are the codes:
self.baseline = nn.Linear(self.params.dimension, 1)local baseline_input=self.generate_model.SourceVectorbaseline = self.baseline:forward(baseline_input) # source hidden representation in generator
As I am not familiar with Lua, I may misunderstand the code. Hope that someone can help me.
The paper mentioned that the baseline is built by the "hierarchical network" with a linear regression after taking the input. But, I only found that the baseline implementation is just a linear mapping from the generator encoder hidden representation of the sentence to a scalar, which are the codes:
self.baseline = nn.Linear(self.params.dimension, 1)
local baseline_input=self.generate_model.SourceVector
baseline = self.baseline:forward(baseline_input) # source hidden representation in generator
As I am not familiar with Lua, I may misunderstand the code. Hope that someone can help me.