質問編集履歴
3
試したことの追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -100,6 +100,48 @@
|
|
100
100
|
|
101
101
|
|
102
102
|
|
103
|
+
inference_wrapper_base.pyの中身(116行目前後抜粋)
|
104
|
+
|
105
|
+
```python
|
106
|
+
|
107
|
+
def build_graph_from_config(self, model_config, checkpoint_path):
|
108
|
+
|
109
|
+
"""Builds the inference graph from a configuration object.
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
Args:
|
114
|
+
|
115
|
+
model_config: Object containing configuration for building the model.
|
116
|
+
|
117
|
+
checkpoint_path: Checkpoint file or a directory containing a checkpoint
|
118
|
+
|
119
|
+
file.
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
Returns:
|
124
|
+
|
125
|
+
restore_fn: A function such that restore_fn(sess) loads model variables
|
126
|
+
|
127
|
+
from the checkpoint file.
|
128
|
+
|
129
|
+
"""
|
130
|
+
|
131
|
+
tf.logging.info("Building model.")
|
132
|
+
|
133
|
+
self.build_model(model_config)
|
134
|
+
|
135
|
+
saver = tf.train.Saver() #116行目
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
return self._create_restore_fn(checkpoint_path, saver)
|
140
|
+
|
141
|
+
```
|
142
|
+
|
143
|
+
|
144
|
+
|
103
145
|
|
104
146
|
|
105
147
|
ここに問題に対して試したことを記載してください。
|
2
エラーの修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -86,49 +86,15 @@
|
|
86
86
|
|
87
87
|
エラー文
|
88
88
|
|
89
|
-
エラー文を見る限り、`run_inference.py`というファイルが無いと書かれています。
|
90
|
-
|
91
|
-
ファイルは存在するのですが、開こうとすると
|
92
|
-
|
93
89
|
```
|
94
90
|
|
95
|
-
|
96
|
-
|
97
|
-
```
|
98
|
-
|
99
|
-
とポップアップが出ます。
|
100
|
-
|
101
|
-
どうすればいいのでしょうか。
|
102
|
-
|
103
|
-
```
|
104
|
-
|
105
|
-
Traceback (most recent call last):
|
106
|
-
|
107
|
-
File "test/models/research/im2txt/bazel-bin/im2txt/run_inference", line 208, in <module>
|
108
|
-
|
109
|
-
Main()
|
110
|
-
|
111
|
-
File "test/models/research/im2txt/bazel-bin/im2txt/run_inference", line 170, in Main
|
112
|
-
|
113
|
-
'Cannot exec() %r: file not found.' % main_filename
|
114
|
-
|
115
|
-
AssertionError: Cannot exec() '/Users/name/Desktop/show_and_tell/test/models/research/im2txt/bazel-bin/im2txt/run_inference.runfiles/im2txt/im2txt/run_inference.py': file not found.
|
116
|
-
|
117
|
-
yamatonao-no-MacBook-Air:show_and_tell yamatonao$ test/models/research/im2txt/bazel-bin/im2txt/run_inference --checkpoint_path="test/models/research/im2txt/model.ckpt-2000000" --vocab_file="test/models/research/im2txt/word_counts.txt" --input_files="test/models/research/im2txt/im2txt/cat.jpg"
|
118
|
-
|
119
|
-
Traceback (most recent call last):
|
120
|
-
|
121
|
-
File "test/models/research/im2txt/bazel-bin/im2txt/run_inference", line 208, in <module>
|
122
|
-
|
123
|
-
Main()
|
124
|
-
|
125
|
-
File "test/models/research/im2txt/bazel-bin/im2txt/run_inference", line 170, in Main
|
126
|
-
|
127
|
-
'Cannot exec() %r: file not found.' % main_filename
|
128
|
-
|
129
|
-
AssertionError: Cannot exec() '/Users/username/Desktop/show_and_tell/test/models/research/im2txt/bazel-bin/im2txt/run_inference.runfiles/im2txt/im2txt/run_inference.py': file not found.
|
91
|
+
NotFoundError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a Variable name or other graph key that is missing from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:
|
130
92
|
|
131
93
|
|
94
|
+
|
95
|
+
Key lstm/basic_lstm_cell/bias not found in checkpoint
|
96
|
+
|
97
|
+
[[node save/RestoreV2 (defined at /Users/username/Desktop/show_and_tell/test/models/research/im2txt/bazel-bin/im2txt/run_inference.runfiles/im2txt/im2txt/inference_utils/inference_wrapper_base.py:116) = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]
|
132
98
|
|
133
99
|
```
|
134
100
|
|
1
試したことの修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -72,13 +72,13 @@
|
|
72
72
|
|
73
73
|
### 試したこと
|
74
74
|
|
75
|
-
エラー文では、Mフォルダがないというエラーが出ていたので、Mフォルダのないコマンドで試したところ
|
75
|
+
エラー文では、Mフォルダがないというエラーが出ていたので、Mフォルダのないコマンドで試したところ、
|
76
|
+
|
77
|
+
さらに別のエラーが出て、解決できませんでした。
|
76
78
|
|
77
79
|
```bash
|
78
80
|
|
79
81
|
$ test/models/research/im2txt/bazel-bin/im2txt/run_inference --checkpoint_path="test/models/research/im2txt/model.ckpt-2000000" --vocab_file="test/models/research/im2txt/word_counts.txt" --input_files="test/models/research/im2txt/im2txt/cat.jpg"
|
80
|
-
|
81
|
-
|
82
82
|
|
83
83
|
```
|
84
84
|
|
@@ -86,15 +86,47 @@
|
|
86
86
|
|
87
87
|
エラー文
|
88
88
|
|
89
|
+
エラー文を見る限り、`run_inference.py`というファイルが無いと書かれています。
|
90
|
+
|
91
|
+
ファイルは存在するのですが、開こうとすると
|
92
|
+
|
89
93
|
```
|
90
94
|
|
91
|
-
|
95
|
+
“run_inference.py”のオリジナルの項目が見つからないため、操作を完了できません。
|
92
96
|
|
97
|
+
```
|
93
98
|
|
99
|
+
とポップアップが出ます。
|
94
100
|
|
95
|
-
|
101
|
+
どうすればいいのでしょうか。
|
96
102
|
|
97
|
-
|
103
|
+
```
|
104
|
+
|
105
|
+
Traceback (most recent call last):
|
106
|
+
|
107
|
+
File "test/models/research/im2txt/bazel-bin/im2txt/run_inference", line 208, in <module>
|
108
|
+
|
109
|
+
Main()
|
110
|
+
|
111
|
+
File "test/models/research/im2txt/bazel-bin/im2txt/run_inference", line 170, in Main
|
112
|
+
|
113
|
+
'Cannot exec() %r: file not found.' % main_filename
|
114
|
+
|
115
|
+
AssertionError: Cannot exec() '/Users/name/Desktop/show_and_tell/test/models/research/im2txt/bazel-bin/im2txt/run_inference.runfiles/im2txt/im2txt/run_inference.py': file not found.
|
116
|
+
|
117
|
+
yamatonao-no-MacBook-Air:show_and_tell yamatonao$ test/models/research/im2txt/bazel-bin/im2txt/run_inference --checkpoint_path="test/models/research/im2txt/model.ckpt-2000000" --vocab_file="test/models/research/im2txt/word_counts.txt" --input_files="test/models/research/im2txt/im2txt/cat.jpg"
|
118
|
+
|
119
|
+
Traceback (most recent call last):
|
120
|
+
|
121
|
+
File "test/models/research/im2txt/bazel-bin/im2txt/run_inference", line 208, in <module>
|
122
|
+
|
123
|
+
Main()
|
124
|
+
|
125
|
+
File "test/models/research/im2txt/bazel-bin/im2txt/run_inference", line 170, in Main
|
126
|
+
|
127
|
+
'Cannot exec() %r: file not found.' % main_filename
|
128
|
+
|
129
|
+
AssertionError: Cannot exec() '/Users/username/Desktop/show_and_tell/test/models/research/im2txt/bazel-bin/im2txt/run_inference.runfiles/im2txt/im2txt/run_inference.py': file not found.
|
98
130
|
|
99
131
|
|
100
132
|
|