Skip to content

Commit 130ec29

Browse files
authored
Merge pull request #1504 from rstudio/retether-v3-9-2
Retether-v3-9-2
2 parents d6158e5 + 08e320c commit 130ec29

File tree

468 files changed

+10617
-92
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

468 files changed

+10617
-92
lines changed

.tether/man/InputLayer.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Help on class InputLayer in module keras.src.layers.core.input_layer:
22

33
class InputLayer(keras.src.layers.layer.Layer)
4-
| InputLayer(shape=None, batch_size=None, dtype=None, sparse=None, batch_shape=None, input_tensor=None, optional=False, name=None, **kwargs)
4+
| InputLayer(shape=None, batch_size=None, dtype=None, sparse=None, ragged=None, batch_shape=None, input_tensor=None, optional=False, name=None, **kwargs)
55
|
66
| Method resolution order:
77
| InputLayer
@@ -22,6 +22,7 @@ class InputLayer(keras.src.layers.layer.Layer)
2222
| batch_size=None,
2323
| dtype=None,
2424
| sparse=None,
25+
| ragged=None,
2526
| batch_shape=None,
2627
| input_tensor=None,
2728
| optional=False,

.tether/man/Layer.txt

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,10 @@ class Layer(keras.src.backend.tensorflow.layer.TFLayer, keras.src.ops.operation.
2626
| trainable: Boolean, whether the layer's variables should be trainable.
2727
| name: String name of the layer.
2828
| dtype: The dtype of the layer's computations and weights. Can also be a
29-
| `keras.DTypePolicy`,
30-
| which allows the computation and
31-
| weight dtype to differ. Defaults to `None`. `None` means to use
32-
| `keras.config.dtype_policy()`,
33-
| which is a `float32` policy unless set to different value
34-
| (via `keras.config.set_dtype_policy()`).
29+
| `keras.DTypePolicy`, which allows the computation and weight dtype
30+
| to differ. Defaults to `None`. `None` means to use
31+
| `keras.config.dtype_policy()`, which is a `float32` policy unless
32+
| set to different value (via `keras.config.set_dtype_policy()`).
3533
|
3634
| Attributes:
3735
| name: The name of the layer (string).
@@ -373,6 +371,20 @@ class Layer(keras.src.backend.tensorflow.layer.TFLayer, keras.src.ops.operation.
373371
| **kwargs
374372
| )
375373
|
374+
| rematerialized_call(
375+
| self,
376+
| layer_call,
377+
| *args,
378+
| **kwargs
379+
| )
380+
| Enable rematerialization dynamically for layer's call method.
381+
|
382+
| Args:
383+
| layer_call: The original `call` method of a layer.
384+
|
385+
| Returns:
386+
| Rematerialized layer's `call` method.
387+
|
376388
| save_own_variables(self, store)
377389
| Saves the state of the layer.
378390
|
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
__signature__
2+
keras.datasets.california_housing.load_data(
3+
version='large',
4+
path='california_housing.npz',
5+
test_split=0.2,
6+
seed=113
7+
)
8+
__doc__
9+
Loads the California Housing dataset.
10+
11+
This dataset was obtained from the [StatLib repository](
12+
https://www.dcc.fc.up.pt/~ltorgo/Regression/cal_housing.html).
13+
14+
It's a continuous regression dataset with 20,640 samples with
15+
8 features each.
16+
17+
The target variable is a scalar: the median house value
18+
for California districts, in dollars.
19+
20+
The 8 input features are the following:
21+
22+
- MedInc: median income in block group
23+
- HouseAge: median house age in block group
24+
- AveRooms: average number of rooms per household
25+
- AveBedrms: average number of bedrooms per household
26+
- Population: block group population
27+
- AveOccup: average number of household members
28+
- Latitude: block group latitude
29+
- Longitude: block group longitude
30+
31+
This dataset was derived from the 1990 U.S. census, using one row
32+
per census block group. A block group is the smallest geographical
33+
unit for which the U.S. Census Bureau publishes sample data
34+
(a block group typically has a population of 600 to 3,000 people).
35+
36+
A household is a group of people residing within a home.
37+
Since the average number of rooms and bedrooms in this dataset are
38+
provided per household, these columns may take surprisingly large
39+
values for block groups with few households and many empty houses,
40+
such as vacation resorts.
41+
42+
Args:
43+
version: `"small"` or `"large"`. The small version
44+
contains 600 samples, the large version contains
45+
20,640 samples. The purpose of the small version is
46+
to serve as an approximate replacement for the
47+
deprecated `boston_housing` dataset.
48+
path: path where to cache the dataset locally
49+
(relative to `~/.keras/datasets`).
50+
test_split: fraction of the data to reserve as test set.
51+
seed: Random seed for shuffling the data
52+
before computing the test split.
53+
54+
Returns:
55+
Tuple of Numpy arrays: `(x_train, y_train), (x_test, y_test)`.
56+
57+
**`x_train`, `x_test`**: numpy arrays with shape `(num_samples, 8)`
58+
containing either the training samples (for `x_train`),
59+
or test samples (for `y_train`).
60+
61+
**`y_train`, `y_test`**: numpy arrays of shape `(num_samples,)`
62+
containing the target scalars. The targets are float scalars
63+
typically between 25,000 and 500,000 that represent
64+
the home prices in dollars.
65+

.tether/man/export_savedmodel.keras.src.models.model.Model.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ keras.Model.export(
33
self,
44
filepath,
55
format='tf_saved_model',
6-
verbose=True,
6+
verbose=None,
77
input_signature=None,
88
**kwargs
99
)
@@ -17,7 +17,8 @@ Args:
1717
`"tf_saved_model"` and `"onnx"`. Defaults to
1818
`"tf_saved_model"`.
1919
verbose: `bool`. Whether to print a message during export. Defaults
20-
to `True`.
20+
to `None`, which uses the default value set by different
21+
backends and formats.
2122
input_signature: Optional. Specifies the shape and dtype of the
2223
model inputs. Can be a structure of `keras.InputSpec`,
2324
`tf.TensorSpec`, `backend.KerasTensor`, or backend tensor. If
@@ -38,6 +39,10 @@ Args:
3839
**Note:** This feature is currently supported only with TensorFlow, JAX
3940
and Torch backends.
4041

42+
**Note:** Be aware that the exported artifact may contain information
43+
from the local file system when using `format="onnx"`, `verbose=True`
44+
and Torch backend.
45+
4146
Examples:
4247

4348
Here's how to export a TensorFlow SavedModel for inference.

.tether/man/keras.layers.txt

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,18 @@ Attention(
2424
seed=None,
2525
**kwargs
2626
)
27+
AugMix(
28+
value_range=(0, 255),
29+
num_chains=3,
30+
chain_depth=3,
31+
factor=0.3,
32+
alpha=1.0,
33+
all_ops=True,
34+
interpolation='bilinear',
35+
seed=None,
36+
data_format=None,
37+
**kwargs
38+
)
2739
AutoContrast(value_range=(0, 255), **kwargs)
2840
average(inputs, **kwargs)
2941
Average(**kwargs)
@@ -440,6 +452,12 @@ Cropping3D(
440452
data_format=None,
441453
**kwargs
442454
)
455+
CutMix(
456+
factor=1.0,
457+
seed=None,
458+
data_format=None,
459+
**kwargs
460+
)
443461
Dense(
444462
units,
445463
activation=None,
@@ -725,6 +743,7 @@ Input(
725743
batch_size=None,
726744
dtype=None,
727745
sparse=None,
746+
ragged=None,
728747
batch_shape=None,
729748
name=None,
730749
tensor=None,
@@ -735,6 +754,7 @@ InputLayer(
735754
batch_size=None,
736755
dtype=None,
737756
sparse=None,
757+
ragged=None,
738758
batch_shape=None,
739759
input_tensor=None,
740760
optional=False,
@@ -1008,12 +1028,30 @@ RandomCrop(
10081028
name=None,
10091029
**kwargs
10101030
)
1031+
RandomErasing(
1032+
factor=1.0,
1033+
scale=(0.02, 0.33),
1034+
fill_value=None,
1035+
value_range=(0, 255),
1036+
seed=None,
1037+
data_format=None,
1038+
**kwargs
1039+
)
10111040
RandomFlip(
10121041
mode='horizontal_and_vertical',
10131042
seed=None,
10141043
data_format=None,
10151044
**kwargs
10161045
)
1046+
RandomGaussianBlur(
1047+
factor=1.0,
1048+
kernel_size=3,
1049+
sigma=1.0,
1050+
value_range=(0, 255),
1051+
data_format=None,
1052+
seed=None,
1053+
**kwargs
1054+
)
10171055
RandomGrayscale(
10181056
factor=0.5,
10191057
data_format=None,
@@ -1027,6 +1065,22 @@ RandomHue(
10271065
seed=None,
10281066
**kwargs
10291067
)
1068+
RandomInvert(
1069+
factor=1.0,
1070+
value_range=(0, 255),
1071+
seed=None,
1072+
data_format=None,
1073+
**kwargs
1074+
)
1075+
RandomPerspective(
1076+
factor=1.0,
1077+
scale=1.0,
1078+
interpolation='bilinear',
1079+
fill_value=0.0,
1080+
seed=None,
1081+
data_format=None,
1082+
**kwargs
1083+
)
10301084
RandomPosterization(
10311085
factor,
10321086
value_range=(0, 255),
@@ -1108,9 +1162,15 @@ Resizing(
11081162
pad_to_aspect_ratio=False,
11091163
fill_mode='constant',
11101164
fill_value=0.0,
1165+
antialias=False,
11111166
data_format=None,
11121167
**kwargs
11131168
)
1169+
RMSNormalization(
1170+
axis=-1,
1171+
epsilon=1e-06,
1172+
**kwargs
1173+
)
11141174
RNN(
11151175
cell,
11161176
return_sequences=False,

.tether/man/keras.ops.image.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ extract_patches(
2424
padding='valid',
2525
data_format=None
2626
)
27+
gaussian_blur(
28+
images,
29+
kernel_size=(3, 3),
30+
sigma=(1.0, 1.0),
31+
data_format=None
32+
)
2733
hsv_to_rgb(images, data_format=None)
2834
map_coordinates(
2935
inputs,
@@ -42,6 +48,14 @@ pad_images(
4248
target_width=None,
4349
data_format=None
4450
)
51+
perspective_transform(
52+
images,
53+
start_points,
54+
end_points,
55+
interpolation='bilinear',
56+
fill_value=0,
57+
data_format=None
58+
)
4559
resize(
4660
images,
4761
size,

.tether/man/keras.ops.nn.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,20 @@ one_hot(
122122
dtype=None,
123123
sparse=False
124124
)
125+
polar(abs_, angle)
125126
psnr(
126127
x1,
127128
x2,
128129
max_val
129130
)
130131
relu(x)
131132
relu6(x)
133+
rms_normalization(
134+
x,
135+
scale=1,
136+
axis=-1,
137+
epsilon=None
138+
)
132139
selu(x)
133140
separable_conv(
134141
inputs,

.tether/man/keras.ops.numpy.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,13 +287,19 @@ roll(
287287
shift,
288288
axis=None
289289
)
290+
rot90(
291+
array,
292+
k=1,
293+
axes=(0, 1)
294+
)
290295
round(x, decimals=0)
291296
select(
292297
condlist,
293298
choicelist,
294299
default=0
295300
)
296301
sign(x)
302+
signbit(x)
297303
sin(x)
298304
sinh(x)
299305
size(x)

.tether/man/keras.ops.txt

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ convert_to_numpy(x)
146146
convert_to_tensor(
147147
x,
148148
dtype=None,
149-
sparse=None
149+
sparse=None,
150+
ragged=None
150151
)
151152
copy(x)
152153
correlate(
@@ -462,6 +463,7 @@ pad(
462463
mode='constant',
463464
constant_values=None
464465
)
466+
polar(abs_, angle)
465467
power(x1, x2)
466468
prod(
467469
x,
@@ -484,6 +486,11 @@ quantile(
484486
)
485487
ravel(x)
486488
real(x)
489+
rearrange(
490+
tensor,
491+
pattern,
492+
**axes_lengths
493+
)
487494
reciprocal(x)
488495
relu(x)
489496
relu6(x)
@@ -495,11 +502,22 @@ repeat(
495502
reshape(x, newshape)
496503
rfft(x, fft_length=None)
497504
right_shift(x, y)
505+
rms_normalization(
506+
x,
507+
scale=1,
508+
axis=-1,
509+
epsilon=None
510+
)
498511
roll(
499512
x,
500513
shift,
501514
axis=None
502515
)
516+
rot90(
517+
array,
518+
k=1,
519+
axes=(0, 1)
520+
)
503521
round(x, decimals=0)
504522
rsqrt(x)
505523
saturate_cast(x, dtype)
@@ -556,6 +574,7 @@ separable_conv(
556574
shape(x)
557575
sigmoid(x)
558576
sign(x)
577+
signbit(x)
559578
silu(x)
560579
sin(x)
561580
sinh(x)

0 commit comments

Comments
 (0)