Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libprotobuf ERROR C:\ci\libprotobuf_1523040574637\work\src\google\protobuf\text_format.cc:288] Error parsing text-format caffe.NetParameter: 524:15: Message type "caffe.LayerParameter" has no field named "irnn_param" #219

Closed
guanhuankang opened this issue Aug 22, 2020 · 1 comment
Assignees

Comments

@guanhuankang
Copy link

guanhuankang commented Aug 22, 2020

Install

I install caffe(python version) by running following command:
conda create -n caffe python=3.7
conda install caffe-gpu
; And I have ran the test code successfully, the test code as follow:
import caffe
caffe.set_device(0)
caffe.set_mode_gpu()

Problem

However, when I try to load a model and do some test on it , I encounter the above problem. It seems like that caffe fails to parse the network. I am a very new player on caffe. Thank you for any help!

The file I try to run as follow:

from IPython import get_ipython

import numpy as np
import matplotlib.pyplot as plt
import matplotlib.pylab as pylab
import matplotlib.cm as cm
import scipy.misc
from PIL import Image
import scipy.io
import os
import scipy.misc
import time

import caffe

EPSILON = 1e-8

def getFileList( p ):
p = str( p )
if p=="":
return [ ]
if p[ -1] != "/":
p = p+"/"
a = os.listdir( p )
b = [ x for x in a if os.path.isfile( p + x ) ]
return b

data_root = r'C:\Users\Rot\Downloads\MistGPU\SBU-shadow\SBU-shadow\SBU-Test'
with open(r'C:\Users\Rot\Downloads\MistGPU\SBU-shadow\SBU-shadow\SBU-Test\test.txt') as f:
test_name = f.readlines()

test_lst = [data_root+x.strip() for x in test_name]

print(test_lst[0], len(test_lst))

caffe.set_mode_gpu()
caffe.set_device(0)
caffe.SGDSolver.display = 0

print("Load start")
net = caffe.Net('deploy.prototxt', 'snapshot/DSC_iter_12000.caffemodel', caffe.TEST)

print("Load finish")
exit(0)


The whole err msg: C:\Users\Rot\Downloads\MistGPU\SBU-shadow\SBU-shadow\SBU-TestShadowImages/$_35.jpg 638 WARNING: Logging before InitGoogleLogging() is written to STDERR I0822 15:32:36.296939 23268 common.cpp:36] System entropy source not available, using fallback algorithm to generate seed instead. Load start W0822 15:32:36.299937 23268 _caffe.cpp:175] DEPRECATION WARNING - deprecated use of Python interface W0822 15:32:36.299937 23268 _caffe.cpp:176] Use this instead (with the named "weights" parameter): W0822 15:32:36.299937 23268 _caffe.cpp:178] Net('deploy.prototxt', 1, weights='snapshot/DSC_iter_12000.caffemodel') [libprotobuf ERROR C:\ci\libprotobuf_1523040574637\work\src\google\protobuf\text_format.cc:288] Error parsing text-format caffe.NetParameter: 524:15: Message type "caffe.LayerParameter" has no field named "irnn_param". F0822 15:32:36.345911 23268 upgrade_proto.cpp:90] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: deploy.prototxt *** Check failure stack trace: ***
@nikolausmayer
Copy link
Contributor

This does not sound like a FlowNet issue, but like a Caffe problem.
Message type "caffe.LayerParameter" has no field named "irnn_param". indicates that you might be using a wrong Caffe version, or have multiple installed versions that interfere with each other.
Please redirect this issue to the maintainers of Caffe or of the network you are trying to run. We can only assist with queries specific to FlowNet.

@nikolausmayer nikolausmayer self-assigned this Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants