wuhp commited on
Commit
a70743a
·
verified ·
1 Parent(s): edbd3ed

Update constants.ts

Browse files
Files changed (1) hide show
  1. 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: 'Any PyTorch/Python Module',
416
  category: 'Utility',
417
  parameters: [
418
- { name: 'class_name', type: 'string', label: 'Class Name', default: 'MyCustomLayer', description: "e.g., 'torch.nn.Identity' or 'MyBlock'" },
419
- { name: 'args', type: 'string', label: 'Arguments', default: '', description: "e.g., 'dim=128, p=0.1'" }
 
 
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]: {