Posts

Post not yet marked as solved
1 Replies
234 Views
I have an mlprogram of size 127.2MB it was created using tensorflow and then converted to CoreML. When I request a prediction the amount of memory shoots up to 2-2.5GB every time. I've tried using the optimization techniques in coremltools but nothing seems to work it still shoots up to the same 2-2.5GB of ram every time. I've attached a graph to see it doesn't seem to be a leak as the memory is then going back down.
Posted
by Michi314.
Last updated
.
Post not yet marked as solved
2 Replies
2.3k Views
I have this basic get request when I call it in app I receive the error below. When I run it in playgrounds I get the same error let url = DevAPI.BaseURL.submitted guard let requestUrl = url else { fatalError() } var request = URLRequest(url: requestUrl) request.httpMethod = "GET" let tokenString = UserDefaults.standard.string(forKey: "name") ?? "" request.setValue(tokenString, forHTTPHeaderField: "x-access-token") let session = URLSession.shared session.dataTask(with: request) { (data, response, error) in if error != nil { 	  print("error :::", error)  	 } else {         print("no error", response)     } }.resume() This request is never making it to the server as in the logs I don't see anything show up when its made. 2020-12-23 12:29:37.817028-0500 Hammoq[63627:1122236] Task <9EAC71EE-DA88-4356-A180-D843E89CC7B9>.<1> finished with error [303] Error Domain=kCFErrorDomainCFNetwork Code=303 "(null)" UserInfo={_NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <9EAC71EE-DA88-4356-A180-D843E89CC7B9>.<1>, _kCFStreamErrorDomainKey=4, NSErrorPeerAddressKey=<CFData 0x600003820f50 [0x7fff8002e8c0]>{length = 16, capacity = 16, bytes = 0x100201bb23b852d00000000000000000}, _kCFStreamErrorCodeKey=-2205, _NSURLErrorRelatedURLSessionTaskErrorKey=(     "LocalDataTask <9EAC71EE-DA88-4356-A180-D843E89CC7B9>.<1>" )} error ::: Optional(Error Domain=kCFErrorDomainCFNetwork Code=303 "(null)" UserInfo={_NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <9EAC71EE-DA88-4356-A180-D843E89CC7B9>.<1>, _kCFStreamErrorDomainKey=4, NSErrorPeerAddressKey=<CFData 0x600003820f50 [0x7fff8002e8c0]>{length = 16, capacity = 16, bytes = 0x100201bb23b852d00000000000000000}, _kCFStreamErrorCodeKey=-2205, _NSURLErrorRelatedURLSessionTaskErrorKey=(     "LocalDataTask <9EAC71EE-DA88-4356-A180-D843E89CC7B9>.<1>" )}) If I use a different url from the same db I don't receive any errors. Another strange thing is that if I remove the header "x-access-token" I do not get the error and instead get response 403 which makes sense.
Posted
by Michi314.
Last updated
.