Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
adaptive
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Quantum Tinkerer
adaptive
Commits
84cba2ee
Commit
84cba2ee
authored
6 years ago
by
Bas Nijholt
Browse files
Options
Downloads
Patches
Plain Diff
update 'uniform_sampling_1d' example in the docs
parent
7408ed57
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#13519
passed
6 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/source/tutorial/tutorial.custom_loss.rst
+2
-5
2 additions, 5 deletions
docs/source/tutorial/tutorial.custom_loss.rst
with
2 additions
and
5 deletions
docs/source/tutorial/tutorial.custom_loss.rst
+
2
−
5
View file @
84cba2ee
...
...
@@ -60,11 +60,8 @@ simple (but naive) strategy is to *uniformly* sample the domain:
.. jupyter-execute::
def uniform_sampling_1d(interval, scale, data):
# Note that we never use 'data'; the loss is just the size of the subdomain
x_left, x_right = interval
x_scale, _ = scale
dx = (x_right - x_left) / x_scale
def uniform_sampling_1d(xs, ys):
dx = xs[1] - xs[0]
return dx
def f_divergent_1d(x):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment