I first of all seem to be missing out on how to calculate missing values and this was my initil guess of error origin. The other thing I need help with is with the tf.greater part, where we check if label is grreater thn men.Any help?
Welcome to the course and thanks for your question.
There is a mistake in your traffic_volume = line of code. Hint: you should use the _fill_in_missing function defined at the bottom of this code block.
Hope that helps.
@mjsmid also, I scrolled through previous issues raised on discourse on the same and found that some notebooks had the _fill_in_missing_function. I copied its code to my notebook cell(a the bottom of code block as you stated) then now I am getting the error âTensorâ object has no attribute âindicesâ
Hi @Wangari ,
Thanks for your feedback.
I donât know exactly what the issue is from the info you gave. Could you please share the code block and a snippet of the error message?
Could you please try to use tf.cast within the _fill_in_missing function and see if that works? I tried your code and it worked anyway with the tf.cast outside the function and as inputs[_VOLUME_KEY] already comes as a SparseTensor it should work both ways, so I doubt if this works.
Could you please also share the transform code definition and check if all definitions of the contents of the constants module are still as below?
%%writefile {_traffic_transform_module_file}
import tensorflow as tf import tensorflow_transform as tft
I also get the same error when I tried both options, _fill_in_missing inside tf.cast and also following the suggestion to use tf.cast within the _fill_in_missing function âŚ
@edgarbc I also tried several similar ways of resolving the errors but did not succeed.
Eventually I just submitted the assignment that way and passed but not with 100% score.
I think this might be caused by something that Tensorflow hasnât found a solution for yet seeing that even some of the frameworks here are recently(less than a month ago) updated.
Just went through the notebook again and somehow it worked without hiccups. It looks like in your case the inputs[_VOLUME_KEY] are not being loaded as a SparseTensor. To dig a bit deeper, could you please include the following lines of code before traffic_volume = ⌠to see how the inputs are being loaded?
Then after running the subsequent cell, you see that it should recognize the inputs as a dictionary and the inputs[_VOLUME_KEY] as a SparseTensor.
Please let me know what datatypes the inputs take in your case.
From the Errormessage displayed in your post , my hunch is that it has something to do with the python/numpy version or the tf version you run.
Could you please also check these by running: import numpy as np print(np.version) print(tf.version)
Hi @chris.favila . I guess you may also be able to help with this issue. One of the strange things is that for the students there was no _fill_in_missing(x): function in the writefile , so something might be wrong with the online Assignment Notebook in Coursera.
Hi, When I print the inputs mentioned above in the preprocessing_fn I get:
<class âtensorflow.python.framework.ops.Tensorâ>
<class âdictâ>
<class âtensorflow.python.framework.ops.Tensorâ>
<class âdictâ>
Then an âAttributeError: âNoneTypeâ object has no attribute ânameââ
Hi Maarten! Sorry for the late reply. The _fill_in_missing() function should not be needed anymore when this course was refreshed so it is indeed not in the notebook. The error might be coming from another part of the solution. You might be in the old session as well thatâs why that solution is working for you. Will send you a DM on how to switch as a mentor. Thanks!
@edgarbc I still need help getting the pre-processing function to work properly. even ignoring the fil_in_missing function, I still get errors. Could you share what you did to resolve the issue?
Hâey, itâs been 2 months since I am stuck in same assignment whereas I have already finished assignment 3. So, this assignment is stopping me from finishing this course.
I keep getting preprocessing_fn wrong.
moderator edit: removed code
Iâ need a third eye here, I have tried everything