def setup_components_and_tf_funcs(self, custom_getter=None):
<EOL>self.network = Network.from_spec(<EOL>spec=self.network_spec,<EOL>kwargs=dict(summary_labels=self.summary_labels)<EOL>)<EOL>assert len(self.internals_spec) == <NUM_LIT:0><EOL>self.internals_spec = self.network.internals_spec()<EOL>for name in sorted(self.internals_spec):<EOL><INDENT>internal = self.internals_spec[name]<EOL>self.internals_input[name] = tf.placeholder(<EOL>dtype=util.tf_dtype(internal['<STR_LIT:type>']),<EOL>shape=(None,) + tuple(internal['<STR_LIT>']),<EOL>name=('<STR_LIT>' + name)<EOL>)<EOL>if internal['<STR_LIT>'] == '<STR_LIT>':<EOL><INDENT>self.internals_init[name] = np.zeros(shape=internal['<STR_LIT>'])<EOL><DEDENT>else:<EOL><INDENT>raise TensorForceError("<STR_LIT>")<EOL><DEDENT><DEDENT>custom_getter = super(DistributionModel, self).setup_components_and_tf_funcs(custom_getter)<EOL>self.distributions = self.create_distributions()<EOL>self.fn_kl_divergence = tf.make_template(<EOL>name_='<STR_LIT>',<EOL>func_=self.tf_kl_divergence,<EOL>custom_getter_=custom_getter<EOL>)<EOL>return custom_getter<EOL>
Creates and stores Network and Distribution objects.
Generates and stores all template functions.