Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • N NIFTy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 22
    • Issues 22
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 17
    • Merge requests 17
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ift
  • NIFTy
  • Merge requests
  • !771

Add convenience function to `Operator` to apply it to random samples

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Lukas Platz requested to merge operator_random_sample_convenience_function into NIFTy_8 Apr 26, 2022
  • Overview 16
  • Commits 5
  • Pipelines 4
  • Changes 2

When developing generative models, one often needs to pass random samples through operator chains to evaluate their output.

To eliminate the need to type op(ift.from_random(op.domain)) all the time, this MR adds the method get_random_sample() to ift.operators.operator.Operator. It implements the above given code without introducing import loops and passes keyword arguments through to the from_random call to make it as general as the reference code.

@parras @mtr What do you think about it? Do you have objections, also to the naming of the function? Is this functionality already present somehow?

Cheers!

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: operator_random_sample_convenience_function