CNTK icon indicating copy to clipboard operation
CNTK copied to clipboard

Fix Dense init bug where initialisation of kernel weights with a numpy array raises a TypeError

Open delzac opened this issue 6 years ago • 1 comments

Allow the initialisation of the kernel weight to be directly initialised by a numpy array, in line with the documentation of Dense layer.

Previously, before this amendment, there is a bug (#2913 ) where initialising kernel weight with numpy array raises TypeError: in method 'random_initializer_with_rank', argument 1 of type 'CNTK::ParameterInitializer const &'

This method of allowing dense kernel weight to be initialised by a numpy array is the same as what you see in the all the Convolution API Layers.

delzac avatar Mar 10 '19 09:03 delzac

@liqunfu @KeDengMS @BowenBao Like to request for review. Its a trivial change, but will allow weights from pre-trained models from other frameworks to be instantiated in cntk.

delzac avatar Apr 02 '19 07:04 delzac