longpipe 0.0.10 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -24,7 +24,7 @@ interface Presenter {
24
24
  run(): void;
25
25
  }
26
26
  type RenderTarget = "main" | "preview";
27
- type Activation = "none" | "relu6" | "relu";
27
+ type Activation = "none" | "relu6" | "relu" | "leaky";
28
28
  interface Conv2dParams {
29
29
  outChannels: number;
30
30
  kernel: number;
@@ -38,6 +38,26 @@ interface DepthwiseParams {
38
38
  padding: number | "same" | "valid";
39
39
  activation: Activation;
40
40
  }
41
+ interface ConvTranspose2dParams {
42
+ outChannels: number;
43
+ kernel: number;
44
+ stride: number;
45
+ padding: number;
46
+ activation: Activation;
47
+ }
48
+ interface WarpParams {
49
+ flowScale: number;
50
+ }
51
+ interface StabilizeParams {
52
+ tLo: number;
53
+ tHi: number;
54
+ leak: number;
55
+ release: number;
56
+ tDiv: number;
57
+ divScale: number;
58
+ stepX: number;
59
+ stepY: number;
60
+ }
41
61
  interface UpsampleParams {
42
62
  outH: number;
43
63
  outW: number;
@@ -71,14 +91,18 @@ interface Backend {
71
91
  upload(data: DataView_): MLBuffer;
72
92
  ops: {
73
93
  Conv2d: (input: Tensor, weights: Conv2DWeights, params: Conv2dParams) => Op;
94
+ ConvTranspose2d: (input: Tensor, weights: Conv2DWeights, params: ConvTranspose2dParams) => Op;
74
95
  DepthwiseConv2d: (input: Tensor, weights: DepthwiseWeights, params: DepthwiseParams) => Op;
75
96
  Add: (a: Tensor, b: Tensor) => Op;
76
97
  Sigmoid: (input: Tensor) => Op;
77
98
  BilinearUpsample: (input: Tensor, params: UpsampleParams) => Op;
99
+ Crop: (input: Tensor, params: UpsampleParams) => Op;
78
100
  BicubicUpsample: (input: Tensor, params: UpsampleParams) => Op;
79
101
  ChannelConcat: (a: Tensor, b: Tensor) => Op;
80
102
  Tanh: (input: Tensor) => Op;
81
103
  ElementwiseMul: (a: Tensor, b: Tensor) => Op;
104
+ Warp: (source: Tensor, flow: Tensor, params: WarpParams) => Op;
105
+ Stabilize: (flow: Tensor, pred: Tensor, ref: Tensor, envPrev: Tensor, params: StabilizeParams) => Op;
82
106
  GatesFused: (uIn: Tensor, hPrev: Tensor, weights: Conv2DWeights) => Op;
83
107
  CandUpdateFused: (uIn: Tensor, hPrev: Tensor, gatesOut: Tensor, weights: Conv2DWeights, gamma: ArrayLike<number>) => Op;
84
108
  ConvExpand: (input: Tensor, weights: Conv2DWeights) => Op;
package/dist/index.d.ts CHANGED
@@ -24,7 +24,7 @@ interface Presenter {
24
24
  run(): void;
25
25
  }
26
26
  type RenderTarget = "main" | "preview";
27
- type Activation = "none" | "relu6" | "relu";
27
+ type Activation = "none" | "relu6" | "relu" | "leaky";
28
28
  interface Conv2dParams {
29
29
  outChannels: number;
30
30
  kernel: number;
@@ -38,6 +38,26 @@ interface DepthwiseParams {
38
38
  padding: number | "same" | "valid";
39
39
  activation: Activation;
40
40
  }
41
+ interface ConvTranspose2dParams {
42
+ outChannels: number;
43
+ kernel: number;
44
+ stride: number;
45
+ padding: number;
46
+ activation: Activation;
47
+ }
48
+ interface WarpParams {
49
+ flowScale: number;
50
+ }
51
+ interface StabilizeParams {
52
+ tLo: number;
53
+ tHi: number;
54
+ leak: number;
55
+ release: number;
56
+ tDiv: number;
57
+ divScale: number;
58
+ stepX: number;
59
+ stepY: number;
60
+ }
41
61
  interface UpsampleParams {
42
62
  outH: number;
43
63
  outW: number;
@@ -71,14 +91,18 @@ interface Backend {
71
91
  upload(data: DataView_): MLBuffer;
72
92
  ops: {
73
93
  Conv2d: (input: Tensor, weights: Conv2DWeights, params: Conv2dParams) => Op;
94
+ ConvTranspose2d: (input: Tensor, weights: Conv2DWeights, params: ConvTranspose2dParams) => Op;
74
95
  DepthwiseConv2d: (input: Tensor, weights: DepthwiseWeights, params: DepthwiseParams) => Op;
75
96
  Add: (a: Tensor, b: Tensor) => Op;
76
97
  Sigmoid: (input: Tensor) => Op;
77
98
  BilinearUpsample: (input: Tensor, params: UpsampleParams) => Op;
99
+ Crop: (input: Tensor, params: UpsampleParams) => Op;
78
100
  BicubicUpsample: (input: Tensor, params: UpsampleParams) => Op;
79
101
  ChannelConcat: (a: Tensor, b: Tensor) => Op;
80
102
  Tanh: (input: Tensor) => Op;
81
103
  ElementwiseMul: (a: Tensor, b: Tensor) => Op;
104
+ Warp: (source: Tensor, flow: Tensor, params: WarpParams) => Op;
105
+ Stabilize: (flow: Tensor, pred: Tensor, ref: Tensor, envPrev: Tensor, params: StabilizeParams) => Op;
82
106
  GatesFused: (uIn: Tensor, hPrev: Tensor, weights: Conv2DWeights) => Op;
83
107
  CandUpdateFused: (uIn: Tensor, hPrev: Tensor, gatesOut: Tensor, weights: Conv2DWeights, gamma: ArrayLike<number>) => Op;
84
108
  ConvExpand: (input: Tensor, weights: Conv2DWeights) => Op;