zhaw/neural_style

name 'relu1_2' is not defined

ziqihuang233 opened this issue · 1 comments

I am not familiar with symbol. When I try to run the script.py,it occured an error.

Traceback (most recent call last):
File "script.py", line 4, in
train.train_style(img_path='../../perceptual/image%s.jpg'%st, model_prefix='s%d'%i, alpha=2e-1, max_epoch=20000)
File "F:\Shared3\hzq\neural_style-master\perceptual\train.py", line 138, in train_style
desc_executor, gram_executors, gene_executor = init_executor(batch_size, weights=weights, style_layers=style_layer, content_layer=content_layer)
File "F:\Shared3\hzq\neural_style-master\perceptual\train.py", line 93, in init_executor
descriptor = symbol.descriptor_symbol(content_layer=content_layer, style_layers=style_layers)
File "F:\Shared3\hzq\neural_style-master\perceptual\symbol.py", line 72, in descriptor_symbol
style_out = mx.sym.Group([x for x in map(eval, style_layers)])
File "F:\Shared3\hzq\neural_style-master\perceptual\symbol.py", line 72, in
style_out = mx.sym.Group([x for x in map(eval, style_layers)])
File "", line 1, in
NameError: name 'relu1_2' is not defined

I have no idea,please help

zhaw commented

Sorry I'm not sure why this happened because relu1_2 is defined at https://github.com/zhaw/neural_style/blob/master/perceptual/symbol.py#L43

This project is very out-dated and may not be compatible with the latest mxnet. I think it's better for you to check out other more recent projects instead of spending too much time on this old one.
If you really really want to run my code, maybe you can try get a much previous version mxnet and run with python2.7