Closed dafs1 closed 4 years ago
@dafs1 Please post the complete stack trace.
Hi Kamal I have same issue on loading checkpoints. I have installed tensorflow-gpu=2.0. Pls help.
2019-12-13 06:57:58.597123: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2019-12-13 06:57:58.611380: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-12-13 06:57:58.612076: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties:
name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285
pciBusID: 0000:00:04.0
2019-12-13 06:57:58.612365: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2019-12-13 06:57:58.613676: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0
2019-12-13 06:57:58.615071: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10.0
2019-12-13 06:57:58.615423: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10.0
2019-12-13 06:57:58.617124: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10.0
2019-12-13 06:57:58.618428: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10.0
2019-12-13 06:57:58.622556: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2019-12-13 06:57:58.622676: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-12-13 06:57:58.623270: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-12-13 06:57:58.623828: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0
2019-12-13 06:57:58.624129: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-12-13 06:57:58.629352: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2200000000 Hz
2019-12-13 06:57:58.629537: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x2dc4f40 executing computations on platform Host. Devices:
2019-12-13 06:57:58.629565: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): Host, Default Version
2019-12-13 06:57:58.722542: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-12-13 06:57:58.723208: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x2dc5100 executing computations on platform CUDA. Devices:
2019-12-13 06:57:58.723232: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0
2019-12-13 06:57:58.723407: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-12-13 06:57:58.723931: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties:
name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285
pciBusID: 0000:00:04.0
2019-12-13 06:57:58.723984: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2019-12-13 06:57:58.724001: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0
2019-12-13 06:57:58.724014: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10.0
2019-12-13 06:57:58.724028: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10.0
2019-12-13 06:57:58.724040: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10.0
2019-12-13 06:57:58.724052: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10.0
2019-12-13 06:57:58.724065: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2019-12-13 06:57:58.724110: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-12-13 06:57:58.724620: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-12-13 06:57:58.725177: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0
2019-12-13 06:57:58.725248: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2019-12-13 06:57:58.726331: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-12-13 06:57:58.726356: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165] 0
2019-12-13 06:57:58.726366: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0: N
2019-12-13 06:57:58.726464: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-12-13 06:57:58.727030: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-12-13 06:57:58.727527: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.
2019-12-13 06:57:58.727559: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1304] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15216 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)
Traceback (most recent call last):
File "/content/gdrive/My Drive/berttf/run_nercolab.py", line 515, in
@dafs1 @ric1910 Could you share the link to weights to the Multi-cased model?
I download model from here https://github.com/google-research/bert bert-base-cased and named that folder as bert-base-cased
I have pretrained my own bert on tf1. I tried converting it to tf2 using google's converter but it didn't work. Do you have a way to convert checkpoints to the format that works with your script?
@fadybaly folow the colab steps https://colab.research.google.com/github/tensorflow/docs/blob/master/site/en/guide/upgrade.ipynb#scrollTo=wfHOhbkgvrKr
@niranjan8129 this updates the script to tf2, not the checkpoint. it took a lot of resources to train the bert model from scratch. not sure i can do it again. do u have any way to convert the checkpoint from tf1 to tf2?
You can refer to https://github.com/kamalkraj/ALBERT-TF2.0 . Here I converted tf hub weights to TF2 weights.
You can refer to https://github.com/kamalkraj/ALBERT-TF2.0 . Here I converted tf hub weights to TF2 weights.
Dear @kamalkraj , I am wondering about a tool to convert TF 1.x weights(not TF-Hub) to TF2.
Thanks in advance.
@niranjan8129 this updates the script to tf2, not the checkpoint. it took a lot of resources to train the bert model from scratch. not sure i can do it again. do u have any way to convert the checkpoint from tf1 to tf2?
Dear @fadybaly , Were you able to convert the TF1.x's checkpoints to TF2.x's pre-trained weights ? If you so, please share the method you've used!.
Thanks in advance.
I have tried to train a model with the Multi Cased model tensorflow but there is an AssertionError when the Checkpoints are loaded. I was wondering if this code supports Multi-cased model.