Closed amiltonwong closed 7 years ago
Fix! I forget to append config setting in file ~/.theanorc It works now
@amiltonwong I have the same TypeError
. Can you explain what config setting you appended to ~/.theanorc
?
Traceback (most recent call last):
File "train.py", line 82, in <module>
all_predictions, split_outputs = dltools.hybrid_training.get_split_outputs(network, deterministic=False)
File "/home/gavin/FRRN/dltools/hybrid_training.py", line 18, in get_split_outputs
all_outputs = lasagne.layers.get_output(network.output_layers + sum(network.splits, []), **kwargs)
File "/home/gavin/FRRN/venv/lib/python3.5/site-packages/lasagne/layers/helper.py", line 191, in get_output
all_outputs[layer] = layer.get_output_for(layer_inputs, **kwargs)
File "/home/gavin/FRRN/venv/lib/python3.5/site-packages/lasagne/layers/special.py", line 52, in get_output_for
return self.nonlinearity(input)
File "/home/gavin/FRRN/dltools/architectures.py", line 88, in log_softmax_4d
x = theano.sandbox.cuda.basic_ops.gpu_contiguous(x)
File "/home/gavin/FRRN/venv/lib/python3.5/site-packages/theano/gof/op.py", line 604, in __call__
node = self.make_node(*inputs, **kwargs)
File "/home/gavin/FRRN/venv/lib/python3.5/site-packages/theano/sandbox/cuda/basic_ops.py", line 3910, in make_node
input = as_cuda_ndarray_variable(input)
File "/home/gavin/FRRN/venv/lib/python3.5/site-packages/theano/sandbox/cuda/basic_ops.py", line 46, in as_cuda_ndarray_variable
return gpu_from_host(tensor_x)
File "/home/gavin/FRRN/venv/lib/python3.5/site-packages/theano/gof/op.py", line 604, in __call__
node = self.make_node(*inputs, **kwargs)
File "/home/gavin/FRRN/venv/lib/python3.5/site-packages/theano/sandbox/cuda/basic_ops.py", line 132, in make_node
dtype=x.dtype)()])
File "/home/gavin/FRRN/venv/lib/python3.5/site-packages/theano/sandbox/cuda/type.py", line 95, in __init__
(self.__class__.__name__, dtype, name))
TypeError: CudaNdarrayType only supports dtype float32 for now. Tried using dtype float64 for variable None
@amiltonwong never mind.
I created ~/.theanorc
and added the following lines:
[global]
floatX = float32
device = gpu0
[nvcc]
fastmath = True
Now it is training.
Hi, @TobyPDE
After switching to install python3.5, I pass the command "python train.py". However, after inputing "path to ityScapes folder", "model filename", "log filename", it runs into the following troubles:
Any suggestion to fix it?
Here are my packages installed: python 3.5.2 opencv 3.1.0 Theano 0.9.0.dev4 Lasagne 0.2.dev1 numpy 1.11.2 scikit-learn 0.17.1
Thanks~