Comments (4)
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.
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.
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.
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)
- Dataset did not match with paper code. HOT 1
- Default eos token not working & gap in clinical performance in reproduced results
- Error : AttributeError: 'generator' object has no attribute 'steps' HOT 4
- Type Error how to solve
- ModuleNotFoundError: No module named 'transformers.configuration_gpt2' HOT 1
- ModuleNotFoundError: No module named 'gpt2.gpt2_model'
- Could not find a version that satisfies the requirement opencv-python==4.1.0.25 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpt2-chest-x-ray-report-generation.