void Start() { #if ENABLE_TENSORFLOW if (File.Exists(Path.Combine(Application.persistentDataPath, TF_MODEL_PATH))) { _tfModel = new TFModel(Path.Combine(Application.persistentDataPath, TF_MODEL_PATH)); } else { _tfModel = new TFModel(Path.Combine(Application.streamingAssetsPath, TF_MODEL_PATH)); } #endif InitAllPositions(); InitObjects(); SetEnvironment(); ResetEnv(); }
void GetModelObjectHandler(AmazonServiceResult <GetObjectRequest, GetObjectResponse> cb) { GetObjectResponse resp = cb.Response; Debug.Log("Retrieved Status: " + resp.HttpStatusCode); if (resp.ResponseStream != null) { using (Stream sr = resp.ResponseStream) { modelBytes = ReadStream(sr); model = new TFModel(modelBytes); } } if (model != null) { Debug.Log("Model successfully retrieved"); } }