Skip to content

Discretized logistic distribution layer - #383

Open
DavideScassola wants to merge 6 commits into
april-tools:mainfrom
DavideScassola:discretized_logistic_layer
Open

Discretized logistic distribution layer#383
DavideScassola wants to merge 6 commits into
april-tools:mainfrom
DavideScassola:discretized_logistic_layer

Conversation

@DavideScassola

Copy link
Copy Markdown
Contributor

I have implemented a layer for the discretized logistic distribution, a distribution defined over the integers:

$$\text{logpdf}(x) = \log( \text{cdf}(x + 0.5) - \text{cdf}(x-0.5))$$ where $$\text{cdf}(x) = \frac{1}{1 + e^{-(x-\mu)/\sigma }}$$

from .input import TorchCategoricalLayer as TorchCategoricalLayer
from .input import TorchConstantValueLayer as TorchLogPartitionLayer
from .input import TorchExpFamilyLayer as TorchExpFamilyLayer
from .input import TorchGaussianLayer as TorchDiscretizedLogisticLayer

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird, I guess it was a typo and you can just substitute it with

from .input import TorchDiscretizedLogisticLayer as TorchDiscretizedLogisticLayer

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I trace the code and it seems like it never imports from this init file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants