Post

Replies

Boosts

Views

Activity

MPSTrainingHelloWorld aborts with error, solution?
In case I am increasing the batch size in Controls.h to a number larger than 64 (e.g. 80) the app stops with an error:validateComputeFunctionArguments:882: failed assertion `Compute Function(cnnConvArray_32x32_64): incorrect type of texture (MTLTextureType2DArray) bound at texture binding at index 16 (expect MTLTextureType2D) for Adest[16].'I have no clue what this error wants to tell me. Does anybody have any clues?
0
0
461
Mar ’20
Convolution node used for training and float16 data type, possible?
Is it possible to use a convolution node with a data type MPSDataTypeFloat16 when training the network?In the optimizer's (Adam optimizer) method encodeToCommandBuffer:convolutionGradientState:...resultState: method I get the following error message when using MPSDataTypeFloat16:/BuildRoot/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShaders/MetalPerformanceShaders-121.4.2/MPSMatrix/LinearAlgebra/MPSMatrix.mm, line 585: error '[MPSVector initWithBuffer:length:dataType] buffer is too small (600) for vector size (1200 bytes)Yes, I have initialized the gradients with MPSDataTypeFloat16 and then the buffer size has to be 600 bytes. But it seems to be that the method assumes to get a vector of data type MPSDataTypeFloat32.
0
0
420
Mar ’20
How to implement custom loss filter for neural networks [MPSCNNKerne]?
For training the model I need a special loss filter. Though Metal implements a couple of loss filters I need another one. Is it possible to create your own loss filter and if how?PS: Actually I need a combination of a cross entropy and a mean squared average error filter.PPS: The MPSCNN documentation is really sparse or not existing. Does anybody know a site that describes a bit the functionality?
0
0
390
Mar ’20
UIDocumentPickerViewController cannot associate thumbnails for text file
I am intializing a UIDocumentPickerViewController with the UTIs public.text and public.text-plain. UIDocumentPickerViewController* documentPickerController = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:[NSArray arrayWithObjects:@"public.text",@"public.text-plain",nil] inMode:UIDocumentPickerModeImport];When selecting a text file I get the error message "Failed to associate thumbnails for picked URL file:///private/var/mobile/Library/Mobile%20Documents/com~apple~CloudDocs/NIC.txt with the Inbox copy file:///private/var/mobile/Containers/Data/Application/B857A5E7-74FE-4479-B899-B61D524B7E0D/tmp/***-Inbox/NIC.txt: Error Domain=QLThumbnailErrorDomain Code=102 "(null)" UserInfo={NSUnderlyingError=0x28250df20 {Error Domain=GSLibraryErrorDomain Code=3 "Generation not found" UserInfo={NSDescription=Generation not found}}}".What can I do to get rid of this error message?
3
0
3.8k
Feb ’20
UIDocumentPickerController and Simulators
Hi,when running my app on a simulator the UIDocumentPickerController correctly opens and displays all files. But when picking one of the files the controller does not send to the delegate a message that one of the items has been picked.The app works correctly on a real device. Is this a known issue or is UIDocumentPickerController not supported on simulators?
2
0
472
Feb ’20
Customer toolbar item and auto-layout
I have seen that a similar question has been asked in 2017 but no there hasn't been a satisfactory answer.I am adding a bar button item with a custom view to the toolbar. How do I adjust the height of the item to the maximum supported size of the toolbar (taking portrait and landscape orientations on an iPhone into consideration)?
6
0
2.7k
Feb ’20
How to implement continuous scrolling or a scroll view?
Assume I have a couple of buttons. Whenever the user touches (and holds) one of the buttons an associated scroll view is scrolling up, down, left or right. It stops scrolling when the user releases the button or the end of the content is reached.How can I make this scrolling smooth? Or better what is the best method?I came up with a couple of ideas:- call setContentOffset:animated: and call it repeatedly- install a timer changing the content offset in small time intervalsBoth proposals I do not like. The first one is not continuous, the second one is a bit over the top. Are there alternatives?
2
0
1.2k
Jan ’20
How to hide UISearchController from navigation item?
In iOS 11.0+ I use the following statements to add a UISearchController to the navigation bar:[[self navigationItem] setSearchController:[self myUISearchController]]; [[self navigationItem] setHidesSearchBarWhenScrolling:NO]; [self setDefinesPresentationContext:YES];To hide the UISearchController I tried the following:[[self myUISearchController] setActive:NO]; [[self myUISearchController] removeFromParentViewController]; // just a try [[self navigationItem] setSearchController:nil]; // this should be sufficient [self myUISearchController:nil];Actually, the search controller disappears but leaves a black rectangle at the position where it was. It seems to be that the UITableViewController inside the UINavigationController does not re-align its table view and therefore leaves a black rectangle.Any ideas?
1
0
2.9k
Mar ’18