I am having a data type error because what should be a float
is actually a char
in a collaborative filtering project I am working on. I am hoping that someone can point out my mistake if I am making one or offer a solution.
My procedure follows the one provided in Chapter 9 of Howard & Gugger:
procs_nn = [Categorify, FillMissing, Normalize]
to_nn = TabularPandas(df, procs_nn, cat, cont, splits=splits, y_names="surfaceShadingDeviceIsOnTimeFraction_SouthFacingWindow_bool")
dls = to_nn.dataloaders(1024)
learn = tabular_learner(dls, y_range = (-0.2, 1.2), layers = [500,250], n_out = 1, loss_func = F.mse_loss)
learn.lr_find()
This is the error message:
0.00% [0/3 00:00<00:00]
0.00% [0/41 00:00<00:00]
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-47-d81c6bd29d71> in <module>()
----> 1 learn.lr_find()
13 frames
/usr/local/lib/python3.7/dist-packages/torch/autograd/__init__.py in backward(tensors, grad_tensors, retain_graph, create_graph, grad_variables, inputs)
154 Variable._execution_engine.run_backward(
155 tensors, grad_tensors_, retain_graph, create_graph, inputs,
--> 156 allow_unreachable=True, accumulate_grad=True) # allow_unreachable flag
157
158
RuntimeError: Found dtype Char but expected Float
Any help resolving this issue would be appreciated.
-Simon