How do I get there from here?

34 views
Skip to first unread message

Pat F

unread,
May 26, 2021, 12:36:36 PM5/26/21
to spyder

New to Spyder as of yesterday actually - but it's working much better than either Emacs or VS (standard) or VSCode did for ML development.

I'm trying to extend the oxford102 training set (102 UK flowers) to 103 - adding a new flower - as part of writing an image recognition engine.  Figured out, to some level of approximation, TFRecords so that I can produce new tdfs compatible data files (locally) with 103 class directories, meaning with photos of the new flower added.

Can successfully load ds_train, ds_valid, and ds_test but currently I'm seeing the following error when I run model.fit:

!next
tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found.
  (0) Invalid argument:  Feature: file_name (data type: string) is required but could not be found.
     [[{{node ParseSingleExample/ParseExample/ParseExampleV2}}]]
     [[IteratorGetNext]]
  (1) Invalid argument:  Feature: file_name (data type: string) is required but could not be found.
     [[{{node ParseSingleExample/ParseExample/ParseExampleV2}}]]
     [[IteratorGetNext]]
     [[IteratorGetNext/_4]]
0 successful operations.
0 derived errors ignored. [Op:__inference_train_function_220631]

The following is where, inside .fit(), things are crashing:

https://imgur.com/a/8ecK8sN

I'm trying to figure out how to debug down to the level where the error is propagating?  

yfprojects

unread,
May 27, 2021, 3:37:22 AM5/27/21
to spyder
Hello,

Spyder comes with the ipdb python debugger. Maybe that helps debugging your error.

Kind regards
yfprojects

Pat F

unread,
May 27, 2021, 6:14:51 PM5/27/21
to spyder
Yes, I"ve been using ipdb all along.

I was thinking of something more advanced where Spyder would help me determine just where the error messages originated.  Not that any development environment - whether ML or not  - has ever necessarily been good in that regard.  I mean, one thing you do is to go to the source tree (with an interpreted language like python) and search the source for the messages you're seeing - although that's not what I did here.

I solved the particular problem by revising how I was making the TFRecord features (dict of keys if you will) in the first place.  The debugger though was of the usual little help in getting there.
Reply all
Reply to author
Forward
0 new messages