question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Converting text file to .t7 file

See original GitHub issue

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 ?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Shubham-kalecommented, Nov 27, 2018

I Apologize for replying so late But there is issue with torch code used in the project I did the project using skip-thought encoding model

On Thu, 22 Nov, 2018, 12:11 PM AnwarUllahKhan <notifications@github.com wrote:

@Shubham-kale https://github.com/Shubham-kale Dear have you solved this issue because I am also facing such kind of error? If yes then please give some suggestions.

thank you very much.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bshillingford/python-torchfile/issues/14#issuecomment-440928521, or mute the thread https://github.com/notifications/unsubscribe-auth/AVzjHZeLgCYEbeLXIdyiJbsxqhq_cPJxks5uxkcqgaJpZM4SmTh3 .

1reaction
Shubham-kalecommented, Sep 8, 2021

@Chinmay4400 , refer - https://github.com/Shubham-kale/Project I used the skip-thoughts pre-trained model, and its been a long time I don’t really remember the details.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Any details when converting txt to t7 format? · Issue #15 - GitHub
Hi, We want to run your model with other datasets. To do this, according to instructions provided, we need to convert our text...
Read more >
Developers - Converting text file to .t7 file - - Bountysource
While trying to run a code which uses torchfile I encountered the following error :- T7ReaderException Traceback (most recent call last) ...
Read more >
Import or export text (.txt or .csv) files - Microsoft Support
To import a text file, you can open the file or import the text file as an external data range. To export a...
Read more >
Converting text files into CSV - CSV Loader
Open the ".txt" file in your default program (usually Notepad or Text Edit). Do not open the file in a text editor like...
Read more >
File Interface - torch7 - Read the Docs
Read/write methods might write in ASCII mode or binary mode. In ASCII mode, numbers are converted in human readable format (characters). Booleans are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found