TobyPDE / FRRN

Full Resolution Residual Networks for Semantic Image Segmentation
MIT License
280 stars 93 forks source link

train error under python3.4: Missing required input: <TensorType(float32, 4D)> #16

Closed cslxiao closed 7 years ago

cslxiao commented 7 years ago

Define network... [16.67s] Load model... [0.33s] Define loss... [1.14s] Compile update functions... [82.92s] Compile validation function... [14.34s] Optimize... [3.68s] Traceback (most recent call last): File "/raid/code/FRRN/FRRN-master/train_frrn_a.py", line 213, in optimizer.optimize() File "/raid/code/FRRN/FRRN-master/dltools/optimizer.py", line 58, in optimize losses = self.train_fn(data.imgs, data.targets, update_counter) File "/raid/code/FRRN/FRRN-master/train_frrn_a.py", line 141, in compute_update loss, grads = dltools.hybrid_training.compute_grads(grad_fns, param_blocks, imgs, targets) File "/raid/code/FRRN/FRRN-master/dltools/hybrid_training.py", line 150, in compute_grads result = grad_fnsi File "/usr/local/lib/python3.4/dist-packages/theano/compile/function_module.py", line 867, in call self.inv_finder[c])) TypeError: Missing required input: <TensorType(float32, 4D)>

Process finished with exit code 1

TobyPDE commented 7 years ago

This is related to #2

Unfortunately, I haven't had the time to make the code work under Python 3.4. Right now it only works under Python 3.5.

Making the code work under Python 3.4 should be fairly simple as the only reason why it fails under 3.4 is the use of the star operator on lists and tuples (e.g. foo(*(1,2,3)) == f(1,2,3))

TobyPDE commented 7 years ago

The new release supports Python 3.4.