textgenrnn icon indicating copy to clipboard operation
textgenrnn copied to clipboard

run wrongly with CPU

Open moseshu opened this issue 5 years ago • 2 comments

I excute the code textgen = textgenrnn() textgen.reset() file="reddit_rarepuppers_politics_2000_context.csv" textgen.train_from_file(file, context=True,new_model=True, num_epochs=10, gen_epochs=5, word_level=True) if i use GPU to run this code, it's OK. but with CPU, it gave me error like this :> ValueError: The two structures don't have the same nested structure.

First structure: type=tuple str=(array([[0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], ..., [0., 0., 0., ..., 0., 0., 0.], [0., 0., 1., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.]], dtype=float32), array([[0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], ..., [0., 0., 0., ..., 0., 0., 0.], [0., 0., 1., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.]], dtype=float32))

Second structure: type=tuple str=(None,)

moseshu avatar Feb 14 '20 13:02 moseshu

I have a similar problem.

qaziquza avatar Mar 19 '21 16:03 qaziquza

it only uses cpu

breadbrowser avatar Jul 05 '22 19:07 breadbrowser