내가 노력하고를 내보내려면 사용자 정의 모델로 만든 TensorflowJS 을 Tensorflow Python. 주제 TF.JS 저장 두물: "모델 js.json" 및 "모델 js.습니다.bin"
나를 가져오 JSON:
with open('model-js/model-js.json') as json_file:
json_config = str(json.loads(json_file.read())["modelTopology"])
json_config=json_config.replace("'","\"")
new_model = tf.keras.models.model_from_json(json_config)
하지만 나는 다음에 오류가:
~\anaconda3\lib\json\decoder.py in raw_decode(self, s, idx)
353 obj, end = self.scan_once(s, idx)
354 except StopIteration as err:
--> 355 raise JSONDecodeError("Expecting value", s, err.value) from None
356 return obj, end
그래서,선 103Json 파일에서"N""Null"의:
"config": {
"batch_input_shape": [
null,
128,
128,
1
],
"dtype": "float32",
"sparse": false,
"name": "conv2d_input"
}
는 나중에 변경 "Null" 에 대한 "None" 가져오는 경우 JSON python.
왜 TensorflowJS 모델물 안에 맞는 파이썬 Tensorflow?
다른 것은 몰라요 어떻게 가져올 수에서 무게.통일이다. 거기에 몇 가지 다른 방법으로는 그렇게 하라고 하셨을까? 또는 다른 종류의할 수 있는 파일에서 내보내 TF.JS?
사전에 감사합니다