4

I have uploaded my train.csv and valid.csv into colab using the files.upload() snippet:

User uploaded file "valid.txt" with length 3387762 bytes User uploaded file "train.txt" with length 9401172 bytes

Running some tensorflow code that runs ok locally and fetches files in the current directory, causes the following error in Colab:

InvalidArgumentError: assertion failed: [string_input_producer requires a non-null input tensor] [[Node: input_producer/Assert/Assert = Assert[T=[DT_STRING], summarize=3, _device="/job:localhost/replica:0/task:0/device:CPU:0"](input_producer/Greater, input_producer/Assert/Assert/data_0)]]

I assume the code can't see the files? What's the path to the uploaded files?

Simon Judge
  • 302
  • 1
  • 3
  • 11
  • Possible duplicate of [How to import and read a shelve or Numpy file in Google Colaboratory?](https://stackoverflow.com/questions/47212852/how-to-import-and-read-a-shelve-or-numpy-file-in-google-colaboratory) – Bob Smith Nov 24 '17 at 16:53

1 Answers1

2

Do the answers on this question help?

How to import and read a shelve or Numpy file in Google Colaboratory?

(The files.upload stores uploaded files in memory. To work with them as files on your filesystem, you'll need to save them explicitly.)

Bob Smith
  • 36,107
  • 11
  • 98
  • 91