clab / clab/dynet

Manually calling an Initializer from Python

Open
#1,205 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
3.4k
Forks
701
PR merge metrics
No merged PRs in 30d

Description

I'd like to initialize my LSTM with an orthogonal matrix, and the only way to do this currently is manually (#529). Of course I could create an orthogonal matrix in NumPy myself, but since this is already implemented in `SaxeInitializer`, it would be nice to be able to call its `initialize_params` method without passing it to a parameter's constructor. The C++ code uses `TensorTools::randomize_orthonormal` but that doesn't seem to be accessible from Python either.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the Python-facing SaxeInitializer and its initialize_params method, then inspect the C++ TensorTools::randomize_orthonormal reference mentioned in the issue. The change is complete when an initializer can be called directly from Python for an LSTM without passing it to a parameter constructor, with the existing orthogonal initialization behavior preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
api, machine-learning
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.