Coder Social home page Coder Social logo

CPU error about neural-storyteller HOT 13 OPEN

ryankiros avatar ryankiros commented on August 12, 2024
CPU error

from neural-storyteller.

Comments (13)

YknZhu avatar YknZhu commented on August 12, 2024

Can you try this fork?

This is a temporary solution that uses Caffe for convnet. You need to change the flag in line 8 of config.py to True for running on CPU. I personally suggest you to grab a coffee while running generate.load_all() as it is super slow in CPU.

from neural-storyteller.

breezedeus avatar breezedeus commented on August 12, 2024

I got the same error as jonathanort did on CPU... And, it's super slow, generate.load_all() costs me almost two days.

from neural-storyteller.

YknZhu avatar YknZhu commented on August 12, 2024

Did you update to the latest commit? If you have set FLAG_CPU_MODE = True then fc7 = numpy.array(lasagne.layers.get_output(net['fc7'], im, deterministic=True).eval()) won't be executed.

generate.load_all() should't take two days... Most time is spent on embedding captions, and it generally takes 10mins or so on a workstation with 32GB memory.

from neural-storyteller.

breezedeus avatar breezedeus commented on August 12, 2024

I am trying with your new fork, but still very slow. I do that on a VM, maybe that's why slow. Can multi-CPU help? Maybe I should try on a physical PC.

Right now, it stops here:
image

from neural-storyteller.

YknZhu avatar YknZhu commented on August 12, 2024

Running on VM is not a good idea. Skipthoughts takes large amount of memory while CNN forwarding / embedding captions require considerable computation power.

Here attaches the printout message on my workstation. It takes ~2mins to get here and 8mins more for embedding captions.

...
I1116 22:54:35.138017  1391 net.cpp:283] This network produces output prob
I1116 22:54:35.138062  1391 net.cpp:297] Network initialization done.
I1116 22:54:35.138077  1391 net.cpp:298] Memory required for data: 1250445440
[libprotobuf WARNING google/protobuf/io/coded_stream.cc:505] Reading dangerously large protocol message.  If the message turns out to be larger than 2147483647 bytes, parsing will be halted for security reasons.  To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.
[libprotobuf WARNING google/protobuf/io/coded_stream.cc:78] The total number of bytes read was 574671192
I1116 22:54:39.202268  1391 upgrade_proto.cpp:618] Attempting to upgrade input file specified using deprecated V1LayerParameter: /ais/guppy9/movie2text/neural-storyteller/models/VGG_ILSVRC_19_layers.caffemodel
I1116 22:54:40.283370  1391 upgrade_proto.cpp:626] Successfully upgraded file specified using deprecated V1LayerParameter
Loading captions...
Embedding captions...

from neural-storyteller.

breezedeus avatar breezedeus commented on August 12, 2024

@YknZhu Thanks. I'll try on a real machine, and tell the result later.

from neural-storyteller.

breezedeus avatar breezedeus commented on August 12, 2024

I can get stories right now, thx. Most of the generated stories seem confusing, hard to understand what about...

from neural-storyteller.

YknZhu avatar YknZhu commented on August 12, 2024

Can you try generate.story(z, './images/ex1.jpg', k=100, bw=50) to confirm you get the same story as in README.md?

from neural-storyteller.

breezedeus avatar breezedeus commented on August 12, 2024

When I change to swift_style.npy, the output is "Hey" for generate.story(z, './images/ex1.jpg', k=100, bw=50, lyric=True) ...

NEAREST-CAPTIONS:
A surfer is silhouetted against a sunset at the beach .
a person rides a horse at sunset along the beach
A person rides a horse on a beach at sunset .
A surfer looks at the ocean while the sun is setting .
people look out at the ocean as some birds fly over

OUTPUT:
Hey

from neural-storyteller.

breezedeus avatar breezedeus commented on August 12, 2024

@YknZhu Any suggestion?

from neural-storyteller.

YknZhu avatar YknZhu commented on August 12, 2024

Sorry for my late reply. Getting super busy these days.

Do you get the same result as shown in README.md by setting lyric=False (and use romance_style.npy)?

from neural-storyteller.

breezedeus avatar breezedeus commented on August 12, 2024

@YknZhu Yes, I can get the same result.

from neural-storyteller.

YknZhu avatar YknZhu commented on August 12, 2024

That is weird. I cannot reproduce your result on my end. Could you try adding

[global]
floatX = float32

in ~/.theanorc

or try running it on GPU?

from neural-storyteller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.