Giter VIP home page Giter VIP logo

Comments (4)

omar-mohamed avatar omar-mohamed commented on July 17, 2024

Hello,
I send the optimizer because the TensorFlow version that I started with required an optimizer to be passed.
CheckpointManager takes a ckpt_path and the model weights are loaded in this part:

ckpt.restore(ckpt_manager.latest_checkpoint)

I hope this helps.

from gpt2-chest-x-ray-report-generation.

VaticanCameos99 avatar VaticanCameos99 commented on July 17, 2024

Hi, thanks for your reply!

I still have a few doubts, I am new to tensorflow.

I downloaded the checkpoint from the drive link and placed it in an appropriate folder, gave the path to that folder in configs.py under ckpt_path. (Used absolute paths)

When I run the code, I get the following error:
tensorflow.python.framework.errors_impl.NotFoundError: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /content/drive/MyDrive/new/GPT2-Chest-X-Ray-Report-Generation/ckpt-27

I used the 'checkpoint_name' function parameter of the CheckpointManager to redirect it to the right filename, but now my latest_checkpoint is None. What could be the reason?

from gpt2-chest-x-ray-report-generation.

omar-mohamed avatar omar-mohamed commented on July 17, 2024

Hey,

I just tried it on googleColab using TF 2.1 and it worked normally. I just pointed to the folder containing the checkpoint in config.py under ckpt_path using absolute paths like the following:

/content/drive/My Drive/colab/GPT2-Chest-X-Ray-Report-Generation/checkpoints/paper-ckpt

or a relative path

./checkpoints/paper-ckpt

No need to use 'checkpoint_name' as CheckpointManager automatically fetches the latest checkpoint from the folder. If it's still not working try to check if the folder is readable from your directory using

import os

if os.path.exists('path_to_folder_or_file'):
   print("found")

from gpt2-chest-x-ray-report-generation.

VaticanCameos99 avatar VaticanCameos99 commented on July 17, 2024

Hey, the issue is resolved. I just picked the 'checkpoint' file from the drive rather than the whole folder.

Thanks a lot.

from gpt2-chest-x-ray-report-generation.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.