Previous question · 903
Continent With Most Companies
easyDatabase
Next question · 905
Ridge Regression
mediumML Coding

904. Transfer learning layer freezing

easy
GeneralGeneral
senior
Function contract
Inputs
k
int
lr
float
grads
list
weights
list
Returns
value
list

Examples

Input
{
  "k": 1,
  "lr": 0.5,
  "grads": [
    [
      [
        0.2,
        -0.4
      ],
      [
        1,
        -1.5
      ]
    ],
    [
      [
        0.1
      ],
      [
        0.2
      ],
      [
        0.3
      ]
    ]
  ],
  "weights": [
    [
      [
        1,
        -2
      ],
      [
        0.5,
        3.5
      ]
    ],
    [
      [
        2
      ],
      [
        -1
      ],
      [
        0
      ]
    ]
  ]
}
Output
[
  [
    [
      1,
      -2
    ],
    [
      0.5,
      3.5
    ]
  ],
  [
    [
      1.95
    ],
    [
      -1.1
    ],
    [
      -0.15
    ]
  ]
]

Constraints

Hint 1
Hint 2
Hint 3
Roles
ML Engineer
AI Engineer
Data Scientist
Research Scientist
Companies
GeneralGeneral
Levels
senior
entry
Tags
transfer-learning
layer-freezing
sgd-update
nested-lists

Similar Questions

Linear Regressionmedium
ML Coding
Activation function relueasy
ML Coding
Text normalizationmedium
ML Coding
26 people are solving this problem
Loading editor for the selected language
Ln 1, Col 1
Program Output
DATAINTERVIEW
Interactive coding terminal
Python / NumPy environment ready.
Type a command below or run code from the editor.
run scriptExecute the current editor contents
submitGrade the current editor contents against all solution test cases
python ("print hello world")Run an isolated Python command
helpShow all available commands