Skip to content

Converting text file to .t7 file #14

Description

@Shubham-kale

While trying to run a code which uses torchfile I encountered the following error :-

T7ReaderException                         Traceback (most recent call last)
<ipython-input-11-89caedbea733> in <module>()
      5 else :
      6     cap_path = "Data/flowers/example_captions"
----> 7 t_file = torchfile.load(cap_path)
      8 #torch.save(cap_path,'ascii')# ///// 'output.t7',
      9 captions_list = t_file.raw_txt

~/anaconda3/envs/tensorflow/lib/python3.6/site-packages/torchfile.py in load(filename, **kwargs)
    422     with open(filename, 'rb') as f:
    423         reader = T7Reader(f, **kwargs)
--> 424         return reader.read_obj()

~/anaconda3/envs/tensorflow/lib/python3.6/site-packages/torchfile.py in read_obj(self)
    412         else:
    413             raise T7ReaderException(
--> 414                 "unknown object type / typeidx: {}".format(typeidx))
    415 
    416 

T7ReaderException: unknown object type / typeidx: 1936287828

I gather that .t7 is not a file format but just an extension , is that true ?
I tried renaming the file under consideration with the extension .t7 , but things didn't workout so I want to know how to convert a text file to .t7 file ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions