NX-AI / xlstm

Official repository of the xLSTM.
https://www.nx-ai.com/
Apache License 2.0
1.42k stars 101 forks source link

_num_blocks can not be passed into the class #56

Open Ryanssssssss opened 2 weeks ago

Ryanssssssss commented 2 weeks ago

When i run the code xLSTM_test_notebook.ipynb , in the forth block the define of block, the attribute _num_blocks can not passed into the class properly but be considered as None which is the default setting of _num_blocks.

warning below: File :\xlstm-main\test..\xlstm\components\init.py:30, in wanginit(param, dim, num_blocks) 28 def wanginit(param: torch.Tensor, dim: int, num_blocks: int): 29 """Adopted from https://github.com/EleutherAI/gpt-neox/blob/main/megatron/model/init_functions.py.""" ---> 30 std = 2 / numblocks / math.sqrt(dim) 31 torch.nn.init.normal(param, mean=0.0, std=std) 32 return param

TypeError: unsupported operand type(s) for /: 'int' and 'NoneType'