1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | import { serialization, Tensor } from '@tensorflow/tfjs-core';
|
15 | import { Constraint } from '../constraints';
|
16 | import { Layer, LayerArgs } from '../engine/topology';
|
17 | import { Initializer, InitializerIdentifier } from '../initializers';
|
18 | import { Shape } from '../keras_format/common';
|
19 | import { Regularizer } from '../regularizers';
|
20 | import { Kwargs } from '../types';
|
21 | export declare interface ReLULayerArgs extends LayerArgs {
|
22 | |
23 |
|
24 |
|
25 | maxValue?: number;
|
26 | }
|
27 | export declare class ReLU extends Layer {
|
28 |
|
29 | static className: string;
|
30 | maxValue: number;
|
31 | constructor(args?: ReLULayerArgs);
|
32 | call(inputs: Tensor | Tensor[], kwargs: Kwargs): Tensor | Tensor[];
|
33 | computeOutputShape(inputShape: Shape | Shape[]): Shape | Shape[];
|
34 | getConfig(): serialization.ConfigDict;
|
35 | }
|
36 | export declare interface LeakyReLULayerArgs extends LayerArgs {
|
37 | |
38 |
|
39 |
|
40 | alpha?: number;
|
41 | }
|
42 | export declare class LeakyReLU extends Layer {
|
43 |
|
44 | static className: string;
|
45 | readonly alpha: number;
|
46 | readonly DEFAULT_ALPHA = 0.3;
|
47 | constructor(args?: LeakyReLULayerArgs);
|
48 | call(inputs: Tensor | Tensor[], kwargs: Kwargs): Tensor | Tensor[];
|
49 | computeOutputShape(inputShape: Shape | Shape[]): Shape | Shape[];
|
50 | getConfig(): serialization.ConfigDict;
|
51 | }
|
52 | export declare interface PReLULayerArgs extends LayerArgs {
|
53 | |
54 |
|
55 |
|
56 | alphaInitializer?: Initializer | InitializerIdentifier;
|
57 | |
58 |
|
59 |
|
60 | alphaRegularizer?: Regularizer;
|
61 | |
62 |
|
63 |
|
64 | alphaConstraint?: Constraint;
|
65 | |
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 | sharedAxes?: number | number[];
|
74 | }
|
75 | export declare class PReLU extends Layer {
|
76 |
|
77 | static className: string;
|
78 | private readonly alphaInitializer;
|
79 | private readonly alphaRegularizer;
|
80 | private readonly alphaConstraint;
|
81 | private readonly sharedAxes;
|
82 | private alpha;
|
83 | readonly DEFAULT_ALPHA_INITIALIZER: InitializerIdentifier;
|
84 | constructor(args?: PReLULayerArgs);
|
85 | build(inputShape: Shape | Shape[]): void;
|
86 | call(inputs: Tensor | Tensor[], kwargs: Kwargs): Tensor | Tensor[];
|
87 | getConfig(): serialization.ConfigDict;
|
88 | }
|
89 | export declare interface ELULayerArgs extends LayerArgs {
|
90 | |
91 |
|
92 |
|
93 | alpha?: number;
|
94 | }
|
95 | export declare class ELU extends Layer {
|
96 |
|
97 | static className: string;
|
98 | readonly alpha: number;
|
99 | readonly DEFAULT_ALPHA = 1;
|
100 | constructor(args?: ELULayerArgs);
|
101 | call(inputs: Tensor | Tensor[], kwargs: Kwargs): Tensor | Tensor[];
|
102 | computeOutputShape(inputShape: Shape | Shape[]): Shape | Shape[];
|
103 | getConfig(): serialization.ConfigDict;
|
104 | }
|
105 | export declare interface ThresholdedReLULayerArgs extends LayerArgs {
|
106 | |
107 |
|
108 |
|
109 | theta?: number;
|
110 | }
|
111 | export declare class ThresholdedReLU extends Layer {
|
112 |
|
113 | static className: string;
|
114 | readonly theta: number;
|
115 | readonly DEFAULT_THETA = 1;
|
116 | constructor(args?: ThresholdedReLULayerArgs);
|
117 | call(inputs: Tensor | Tensor[], kwargs: Kwargs): Tensor | Tensor[];
|
118 | computeOutputShape(inputShape: Shape | Shape[]): Shape | Shape[];
|
119 | getConfig(): serialization.ConfigDict;
|
120 | }
|
121 | export declare interface SoftmaxLayerArgs extends LayerArgs {
|
122 | |
123 |
|
124 |
|
125 |
|
126 | axis?: number;
|
127 | }
|
128 | export declare class Softmax extends Layer {
|
129 |
|
130 | static className: string;
|
131 | readonly axis: number;
|
132 | readonly softmax: (t: Tensor, a?: number) => Tensor;
|
133 | readonly DEFAULT_AXIS = 1;
|
134 | constructor(args?: SoftmaxLayerArgs);
|
135 | call(inputs: Tensor | Tensor[], kwargs: Kwargs): Tensor | Tensor[];
|
136 | computeOutputShape(inputShape: Shape | Shape[]): Shape | Shape[];
|
137 | getConfig(): serialization.ConfigDict;
|
138 | }
|