Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Error while running code in CharacterLM.rmd vignettes #5

@Edmonizel

Description

@Edmonizel

I ran into a problem while attempting to follow the code exactly from the provided CharacterLM.rmd in the vignettes folder .

When I run this line of code, it gives the following error:

> train_lm("shakespeare.txt", epochs, max_num_minibatches)

Error in py_call_impl(callable, dots$args, dots$keywords) : 
  AttributeError: 'Variable' object has no attribute 'astype'
Detailed traceback: 
  File "D:\anaconda3\envs\cntk-py36\lib\site-packages\cntk\ops\functions.py", line 393, in __call__
    _, output_map = self.forward(arg_map, outputs)
  File "D:\anaconda3\envs\cntk-py36\lib\site-packages\cntk\internal\swig_helper.py", line 69, in wrapper
    result = f(*args, **kwds)
  File "D:\anaconda3\envs\cntk-py36\lib\site-packages\cntk\ops\functions.py", line 755, in forward
    None, device)
  File "D:\anaconda3\envs\cntk-py36\lib\site-packages\cntk\internal\sanitize.py", line 431, in sanitize_var_map
    batch = sanitize_batch(var, batch, seq_starts, device)
  File "D:\anaconda3\envs\cntk-py36\lib\site-packages\cntk\internal\swig_helper.py", line 69, in wrapper
    result = f(*args, **kwds)
  File "D:\anaconda3\envs\cntk-py36\lib\site-packages\cntk\internal\sanitize.py", line 200, in sanitize_batch
    return Value.create(var, batch, seq_starts, device)
  File "D:\anaconda3\envs\cntk-py
Called from: py_call_impl(callable, dots$args, dots$keywords)

A deeper analysis identified that the problem actually happens at this section of the train_lm() function:

z <- model(input_sequence)

Help on this issue will be greatly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions