Spaces:
Running
Running
Update constants.ts
Browse files- constants.ts +5 -3
constants.ts
CHANGED
|
@@ -412,11 +412,13 @@ export const LAYER_DEFINITIONS: Record<LayerType, LayerDefinition> = {
|
|
| 412 |
[LayerType.CUSTOM]: {
|
| 413 |
type: LayerType.CUSTOM,
|
| 414 |
label: 'Custom / Code',
|
| 415 |
-
description: '
|
| 416 |
category: 'Utility',
|
| 417 |
parameters: [
|
| 418 |
-
{ name: 'class_name', type: 'string', label: 'Class Name', default: 'MyCustomLayer', description: "
|
| 419 |
-
{ name: 'args', type: 'string', label: 'Arguments', default: '', description: "e.g.
|
|
|
|
|
|
|
| 420 |
]
|
| 421 |
},
|
| 422 |
[LayerType.IDENTITY]: {
|
|
|
|
| 412 |
[LayerType.CUSTOM]: {
|
| 413 |
type: LayerType.CUSTOM,
|
| 414 |
label: 'Custom / Code',
|
| 415 |
+
description: 'Define or instantiate any PyTorch Module',
|
| 416 |
category: 'Utility',
|
| 417 |
parameters: [
|
| 418 |
+
{ name: 'class_name', type: 'string', label: 'Class Name', default: 'MyCustomLayer', description: "Name of the class to instantiate" },
|
| 419 |
+
{ name: 'args', type: 'string', label: 'Arguments', default: '', description: "Constructor args (e.g. dim=128)" },
|
| 420 |
+
{ name: 'imports', type: 'string', label: 'Imports', default: '', description: "Required imports (e.g. import torch.nn.functional as F)" },
|
| 421 |
+
{ name: 'definition_code', type: 'text', label: 'Python Code (Def)', default: '', description: "Full class definition if strictly custom." }
|
| 422 |
]
|
| 423 |
},
|
| 424 |
[LayerType.IDENTITY]: {
|