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

Error :Not Implement nn.SpatialUpSamplingBilinear #28

Open
XunShape opened this issue Jan 13, 2018 · 3 comments
Open

Error :Not Implement nn.SpatialUpSamplingBilinear #28

XunShape opened this issue Jan 13, 2018 · 3 comments

Comments

@XunShape
Copy link

hi, I wanna convert vrn-unguided.t7 in https://github.com/AaronJackson/vrn
and it said :Not Implement nn.SpatialUpSamplingBilinear
actually,i got vrn_unguided.pth and vrn_unguided.py
but a part of vrn_unguided.py was wrong,
like this:
LambdaReduce(lambda x,y: x+y), # CAddTable,
LambdaMap(lambda x: x, # ConcatTable,
nn.Sequential( # Sequential,
nn.Sequential( # Sequential,
nn.Conv2d(256,256,(1, 1)),
nn.BatchNorm2d(256),
nn.ReLU(),
),
nn.Conv2d(256,200,(1, 1)),
#,
,
n,
n,
.,
S,
p,
a,
t,
i,
a,
l,
U,
p,
S,
a,
m,
p,
l,
i,
n,
g,
B,
i,
l,
i,
n,
e,
a,
r,
,
N,
o,
t,
,
I,
m,
p,
l,
e,
m,
e,
n,
t,
,,

,

@crazySyaoran
Copy link

Have the same problem, also the vrn code.
Have you solved?

@alexandru-dinu
Copy link

You have to replace

else:
    s += '# ' + name + ' Not Implemented,\n'

with

else:
    s += ['# ' + name + ' Not Implemented,\n']

Notice the brackets. That's because of map(lambda x: '\t{}'.format(x), s); that function must be mapped onto each sublist from s.

Also, this line must be changed in order to avoiding adding a stray ,.

One very quick fix is:

s = map(lambda x: '{},\n'.format(x) if not x.strip()[0] == '#' else '{}'.format(x), s)

@Goulustis
Copy link

could try to go to the generated .py file and replace it with nn.Upsample

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

4 participants