We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7408ed5 commit 84cba2eCopy full SHA for 84cba2e
docs/source/tutorial/tutorial.custom_loss.rst
@@ -60,11 +60,8 @@ simple (but naive) strategy is to *uniformly* sample the domain:
60
61
.. jupyter-execute::
62
63
- def uniform_sampling_1d(interval, scale, data):
64
- # Note that we never use 'data'; the loss is just the size of the subdomain
65
- x_left, x_right = interval
66
- x_scale, _ = scale
67
- dx = (x_right - x_left) / x_scale
+ def uniform_sampling_1d(xs, ys):
+ dx = xs[1] - xs[0]
68
return dx
69
70
def f_divergent_1d(x):
0 commit comments