Skip to content

About C code conversion to Python #2

@EternityZY

Description

@EternityZY

Your work is very instructive, but the C part of the code can't be debugged.
I want to learn about the function :
causal._causal.sample_mlp(self._np_W0gt, self._np_B0gt,
self._np_W1gt, self._np_B1gt,
self.N, self.gammagt.numpy(),
out=s, alpha=0.1)
(located in line 384 under the models.py folder)

and another function :
causal._causal.logprob_mlp(self._np_W0slow,
self._np_B0slow,
self._np_W1slow,
self._np_B1slow,
self.N,
block,sample,config,logp,
alpha=0.1,temp=self.a.temperature)
(located in line 401 under the models.py folder).
Are these two functions implemented in Python? Or could you please describe the specific process of these two algorithms in detail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions