Giter VIP home page Giter VIP logo

htr's Issues

Ошибка в создании модели

model = Model(params)

params = {
'callbacks': ['checkpoint', 'csv_log', 'tb_log', 'early_stopping'],
'metrics': ['cer', 'accuracy'],
'checkpoint_path': os.path.join(WORKING_DIR, 'checkpoints/training_2/cp.ckpt'),
'csv_log_path': os.path.join(WORKING_DIR, 'logs/csv_logs/log_2.csv'),
'tb_log_path': os.path.join(WORKING_DIR, 'logs/tb_logs/log2'),
'tb_update_freq': 200,
'epochs': 50,
'batch_size': batch_size,
'early_stopping_patience': 10,
'input_img_shape': (new_img_width, new_img_height, 1),
'vocab_len': 75,
'max_label_len': 22,
'chars_path': os.path.join(os.path.split(metadata)[0], 'symbols.txt'),
'blank': '#',
'blank_index': 74,
'corpus': os.path.join(os.path.split(metadata)[0], 'corpus.txt')
}

Пытаюсь создать модель с таким словарем, однако не хватает параметра vocab.

KeyError Traceback (most recent call last)
in
----> 1 model = Model(params)
2 model.build()
3 model.get_summary()
4 #model.load_weights('checkpoints/training_2/cp.ckpt')

/home/htr/model/Model.py in init(self, params)
43 self.max_label_len = params['max_label_len']
44 self.chars_path = params['chars_path']
---> 45 self.vocab = params['vocab']
46 self.blank = params['blank']
47 self.blank_index = None

KeyError: 'vocab'

Как это исправить или что должно быть в vocab?

executor failed running [/bin/bash -c apt-get update && apt-get install -y libgl1]: exit code: 100

F:\HTR>docker build -t htr/tfgpu .
[+] Building 435.5s (4/9)
 => [1/5] FROM docker.io/tensorflow/tensorflow:2.4.1-gpu-jupyter@sha256:c3b4e83edf14b282902c80e0ef245115736ce4c  428.5s
 => => sha256:39db22124f005688940638be691ddd6fcccd364860a75c09bf227bd64b71a6cc 84.73MB / 84.73MB                  34.3s
 => => extracting sha256:419640447d267f068d2f84a093cb13a56ce77e130877f5b8bdb4294f4a90a84f                          0.0s
 => => extracting sha256:61e52f862619ab016d3bcfbd78e5c7aaaa1989b4c295e6dbcacddd2d7b93e1f5                          0.0s
 => => extracting sha256:2a93278deddf8fe289dceef311ed19e8f2083a88eba6be60d393842fd40697b0                          1.1s
[+] Building 435.7s (4/9)
 => [1/5] FROM docker.io/tensorflow/tensorflow:2.4.1-gpu-jupyter@sha256:c3b4e83edf14b282902c80e0ef245115736ce4c  428.7s
 => => sha256:39db22124f005688940638be691ddd6fcccd364860a75c09bf227bd64b71a6cc 84.73MB / 84.73MB                  34.3s
 => => extracting sha256:419640447d267f068d2f84a093cb13a56ce77e130877f5b8bdb4294f4a90a84f                          0.0s
 => => extracting sha256:61e52f862619ab016d3bcfbd78e5c7aaaa1989b4c295e6dbcacddd2d7b93e1f5                          0.0s
 => => extracting sha256:2a93278deddf8fe289dceef311ed19e8f2083a88eba6be60d393842fd40697b0                          1.1s
 => => extracting sha256:c9f080049843544961377a152d7d86c34816221038b8da3e3dc207ccddb72549                          1.6s
 => => extracting sha256:8189556b23294579329c522acf5618c024520b323d6a68cdd9eca91ca4f2f454                          0.0s
 => => sha256:fc3e5b4f9be500b755e357e514e19e6091012e82405ed8af34b8137c76245f8f 3.99MB / 3.99MB                    37.9s
 => => sha256:82f0e853e481c2ffd3a42c9f6d1f0db698ea463e7e6848978dc9649f5decf7c3 176B / 176B                        36.7s
 => => sha256:0e3f4c426c9e5994ac625c63f9e8116e8cfdfe4600ba6c78fc52d06de8bd7dbe 440.43MB / 440.43MB               131.5s
 => => sha256:bd7b74ac1111ef1599411a0197a707306f96edd73ce80e40b85accb872accddb 1.09kB / 1.09kB                    38.5s
 => => sha256:69903a2e24bf9c9fd83c0af1fbdbc4a802d0fba99e38c9d407af0f596102c469 1.09kB / 1.09kB                    39.2s
 => => sha256:c3a9076c8993f5e5fa46e6fa73ac1813757fd093a8389f2b5a942cae5537b4b9 46.66MB / 46.66MB                  58.5s
 => => sha256:dc5bef361fe84b2b8012101a1e4b8879696eb39c3ade23d20f1e36b920921198 410.45kB / 410.45kB                61.8s
[+] Building 435.8s (4/9)
 => [1/5] FROM docker.io/tensorflow/tensorflow:2.4.1-gpu-jupyter@sha256:c3b4e83edf14b282902c80e0ef245115736ce4c  428.8s
 => => sha256:39db22124f005688940638be691ddd6fcccd364860a75c09bf227bd64b71a6cc 84.73MB / 84.73MB                  34.3s
[+] Building 585.7s (6/9)
 => [internal] load build definition from Dockerfile                                                               0.9s
 => => transferring dockerfile: 377B                                                                               0.5s
 => [internal] load .dockerignore                                                                                  0.7s
 => => transferring context: 2B                                                                                    0.4s
 => [internal] load metadata for docker.io/tensorflow/tensorflow:2.4.1-gpu-jupyter                                 5.8s
 => [internal] load build context                                                                                  0.2s
 => => transferring context: 481B                                                                                  0.0s
 => [1/5] FROM docker.io/tensorflow/tensorflow:2.4.1-gpu-jupyter@sha256:c3b4e83edf14b282902c80e0ef245115736ce4c  560.7s
 => => resolve docker.io/tensorflow/tensorflow:2.4.1-gpu-jupyter@sha256:c3b4e83edf14b282902c80e0ef245115736ce4c91  0.0s
 => => sha256:64d8717296f8099f62b7f5abca1560addc2bf19d09021e800ece8b37cc9d89ae 19.63kB / 19.63kB                   0.0s
 => => sha256:c3b4e83edf14b282902c80e0ef245115736ce4c91eabc39c93f51ca56508e504 6.60kB / 6.60kB                     0.0s
 => => sha256:171857c49d0f5e2ebf623e6cb36a8bcad585ed0c2aa99c87a055df034c1e5848 26.70MB / 26.70MB                   3.6s
 => => sha256:419640447d267f068d2f84a093cb13a56ce77e130877f5b8bdb4294f4a90a84f 852B / 852B                         0.8s
 => => sha256:61e52f862619ab016d3bcfbd78e5c7aaaa1989b4c295e6dbcacddd2d7b93e1f5 162B / 162B                         1.0s
 => => sha256:2a93278deddf8fe289dceef311ed19e8f2083a88eba6be60d393842fd40697b0 7.21MB / 7.21MB                     4.7s
 => => sha256:c9f080049843544961377a152d7d86c34816221038b8da3e3dc207ccddb72549 10.33MB / 10.33MB                   5.4s
 => => extracting sha256:171857c49d0f5e2ebf623e6cb36a8bcad585ed0c2aa99c87a055df034c1e5848                          4.5s
 => => sha256:8189556b23294579329c522acf5618c024520b323d6a68cdd9eca91ca4f2f454 1.00kB / 1.00kB                     4.2s
 => => sha256:c9db5d801625d9841844fca4fd240bb1c864f5f8e737ad884cde4d50783ebf37 1.78GB / 1.78GB                   264.7s
 => => sha256:1c370cc33248c9c135e305d2b727d6a351670a2f78b9ed2138bb85432cdfee21 179.19MB / 179.19MB                36.1s
 => => sha256:91490cad11f8302e74e711101e16b34724c7378c64c412a15013ff3e4193bfc2 7.49kB / 7.49kB                     6.0s
 => => sha256:39db22124f005688940638be691ddd6fcccd364860a75c09bf227bd64b71a6cc 84.73MB / 84.73MB                  34.3s
 => => extracting sha256:419640447d267f068d2f84a093cb13a56ce77e130877f5b8bdb4294f4a90a84f                          0.0s
 => => extracting sha256:61e52f862619ab016d3bcfbd78e5c7aaaa1989b4c295e6dbcacddd2d7b93e1f5                          0.0s
 => => extracting sha256:2a93278deddf8fe289dceef311ed19e8f2083a88eba6be60d393842fd40697b0                          1.1s
 => => extracting sha256:c9f080049843544961377a152d7d86c34816221038b8da3e3dc207ccddb72549                          1.6s
 => => extracting sha256:8189556b23294579329c522acf5618c024520b323d6a68cdd9eca91ca4f2f454                          0.0s
 => => sha256:fc3e5b4f9be500b755e357e514e19e6091012e82405ed8af34b8137c76245f8f 3.99MB / 3.99MB                    37.9s
 => => sha256:82f0e853e481c2ffd3a42c9f6d1f0db698ea463e7e6848978dc9649f5decf7c3 176B / 176B                        36.7s
 => => sha256:0e3f4c426c9e5994ac625c63f9e8116e8cfdfe4600ba6c78fc52d06de8bd7dbe 440.43MB / 440.43MB               131.5s
 => => sha256:bd7b74ac1111ef1599411a0197a707306f96edd73ce80e40b85accb872accddb 1.09kB / 1.09kB                    38.5s
 => => sha256:69903a2e24bf9c9fd83c0af1fbdbc4a802d0fba99e38c9d407af0f596102c469 1.09kB / 1.09kB                    39.2s
 => => sha256:c3a9076c8993f5e5fa46e6fa73ac1813757fd093a8389f2b5a942cae5537b4b9 46.66MB / 46.66MB                  58.5s
 => => sha256:dc5bef361fe84b2b8012101a1e4b8879696eb39c3ade23d20f1e36b920921198 410.45kB / 410.45kB                61.8s
 => => sha256:a8cf4ab5b477394948942f0bb6d8e66f2ee402dda75ce9e8192c2471a734e9e4 263B / 263B                        62.6s
 => => sha256:c1c11b71e870852e45aee2dace3afcd60fcdff5125c13dd397c130a070e1a297 158B / 158B                        63.2s
 => => sha256:8267c7e45f596b7c12c23bc7362938e7ab8d88bef5f8fa719f4a0d0f082d7d23 129B / 129B                        64.4s
 => => sha256:ce0d841a8f903e50915c945f40b82b1556a9b0368c5c164b0553c38001f1fcd5 15.50MB / 15.50MB                  73.3s
 => => sha256:3ac95ea8bb4f67af378307748e18b45e5bc3a0e6e6455b586ed828383d8c53b8 7.78kB / 7.78kB                    76.1s
 => => sha256:117b2ba06f191216d424f83b55b72e7ae026d50437bfa11b3922e402ec3e1ea3 11.59kB / 11.59kB                  77.4s
 => => sha256:8739bc7256c624871d843df12dd729aa67865eb166add482441cae22be86e0f2 8.74kB / 8.74kB                    78.3s
 => => sha256:a55168dbf71de17f7e0f601635236f3784ae73dabc90880789cad337cd60f465 7.18kB / 7.18kB                    79.1s
 => => sha256:51fe3f9b075ff6b8aaeb74a7d419bf572c3a6f6243c04818a37776b562bbae08 10.01kB / 10.01kB                  81.4s
 => => sha256:b4a4a5f30f793c9ec694323a53975d7348a5019f6606abc0048a1f1fe3cadad7 5.68kB / 5.68kB                    82.4s
 => => sha256:91685856cab1648efe33e1aca974515939af9685bdd13dc1f40ef1e006a1db00 226B / 226B                        83.2s
 => => sha256:4871f8ab4308c25c98790fd8341c6fb03cfb6548f36f862ada3dba3f5f44c1ce 334.25kB / 334.25kB                86.6s
 => => sha256:f0d9fb274b0f41d26e67fecc6536559a56baabacb7ae724c2df7715a6eb29ff5 3.84kB / 3.84kB                    88.2s
 => => extracting sha256:c9db5d801625d9841844fca4fd240bb1c864f5f8e737ad884cde4d50783ebf37                        160.4s
 => => extracting sha256:1c370cc33248c9c135e305d2b727d6a351670a2f78b9ed2138bb85432cdfee21                         13.1s
 => => extracting sha256:91490cad11f8302e74e711101e16b34724c7378c64c412a15013ff3e4193bfc2                          0.0s
 => => extracting sha256:39db22124f005688940638be691ddd6fcccd364860a75c09bf227bd64b71a6cc                          4.9s
 => => extracting sha256:fc3e5b4f9be500b755e357e514e19e6091012e82405ed8af34b8137c76245f8f                          0.7s
 => => extracting sha256:82f0e853e481c2ffd3a42c9f6d1f0db698ea463e7e6848978dc9649f5decf7c3                          0.0s
 => => extracting sha256:0e3f4c426c9e5994ac625c63f9e8116e8cfdfe4600ba6c78fc52d06de8bd7dbe                         38.7s
 => => extracting sha256:bd7b74ac1111ef1599411a0197a707306f96edd73ce80e40b85accb872accddb                          0.0s
 => => extracting sha256:69903a2e24bf9c9fd83c0af1fbdbc4a802d0fba99e38c9d407af0f596102c469                          0.0s
 => => extracting sha256:c3a9076c8993f5e5fa46e6fa73ac1813757fd093a8389f2b5a942cae5537b4b9                          7.4s
 => => extracting sha256:dc5bef361fe84b2b8012101a1e4b8879696eb39c3ade23d20f1e36b920921198                          0.2s
 => => extracting sha256:a8cf4ab5b477394948942f0bb6d8e66f2ee402dda75ce9e8192c2471a734e9e4                          0.0s
 => => extracting sha256:c1c11b71e870852e45aee2dace3afcd60fcdff5125c13dd397c130a070e1a297                          0.0s
 => => extracting sha256:8267c7e45f596b7c12c23bc7362938e7ab8d88bef5f8fa719f4a0d0f082d7d23                          0.0s
 => => extracting sha256:ce0d841a8f903e50915c945f40b82b1556a9b0368c5c164b0553c38001f1fcd5                          1.1s
 => => extracting sha256:3ac95ea8bb4f67af378307748e18b45e5bc3a0e6e6455b586ed828383d8c53b8                          0.0s
 => => extracting sha256:117b2ba06f191216d424f83b55b72e7ae026d50437bfa11b3922e402ec3e1ea3                          0.0s
 => => extracting sha256:8739bc7256c624871d843df12dd729aa67865eb166add482441cae22be86e0f2                          0.0s
 => => extracting sha256:a55168dbf71de17f7e0f601635236f3784ae73dabc90880789cad337cd60f465                          0.0s
 => => extracting sha256:51fe3f9b075ff6b8aaeb74a7d419bf572c3a6f6243c04818a37776b562bbae08                          0.0s
 => => extracting sha256:b4a4a5f30f793c9ec694323a53975d7348a5019f6606abc0048a1f1fe3cadad7                          0.0s
 => => extracting sha256:91685856cab1648efe33e1aca974515939af9685bdd13dc1f40ef1e006a1db00                          0.0s
 => => extracting sha256:4871f8ab4308c25c98790fd8341c6fb03cfb6548f36f862ada3dba3f5f44c1ce                          0.1s
 => => extracting sha256:f0d9fb274b0f41d26e67fecc6536559a56baabacb7ae724c2df7715a6eb29ff5                          0.0s
 => ERROR [2/5] RUN apt-get update &&  apt-get install -y libgl1                                                  18.0s
------
 > [2/5] RUN apt-get update &&  apt-get install -y libgl1:
#5 1.702 Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
#5 1.795 Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
#5 1.917 Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
#5 2.150 Get:4 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64  InRelease [1581 B]
#5 2.445 Err:4 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64  InRelease
#5 2.445   The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
#5 2.686 Get:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [83.3 kB]
#5 2.986 Get:6 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [23.8 kB]
#5 3.008 Ign:7 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64  InRelease
#5 3.092 Get:8 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64  Release [564 B]
#5 3.164 Get:9 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64  Release.gpg [833 B]
#5 3.220 Get:10 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [3373 kB]
#5 3.275 Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [30.8 kB]
#5 3.508 Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [2410 kB]
#5 3.743 Get:13 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64  Packages [73.8 kB]
#5 5.134 Get:14 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [1636 kB]
#5 5.236 Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [1728 kB]
#5 5.646 Get:16 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [1688 kB]
#5 5.820 Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [3785 kB]
#5 6.594 Get:18 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [64.0 kB]
#5 6.595 Get:19 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [20.6 kB]
#5 8.836 Reading package lists...
#5 15.70 W: GPG error: https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64  InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
#5 15.70 E: The repository 'https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64  InRelease' is no longer signed.
------
executor failed running [/bin/bash -c apt-get update &&         apt-get install -y libgl1]: exit code: 100

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.