Open msaad1311 opened 4 years ago
You can use a string (hp.Choice('kernel_size', ['(1, 3)', '(1, 5)'])
) and parse it, or only make the choice on the particular elements of the tuple (hp.Choice('kernel_size_1', [3, 5])
).
@omalleyt12 @haifeng-jin Is there a reason for not supporting tuples?
@yixingfu i cant pass hp.Choice('Kernel_size_1',[3,5])
as that would generate the kernel size of 3x3
and 5x5
whereas, i want to generate the kernels of 1x3
and 1x5
. I will, however, try passing as a string but will it work since wouldnt that be considered a string in the ConvLSTM2D
parameter?
Furthermore, is there any other way to pass the tuple into the algorithm?
@msaad1311
I am not completely sure about how you want to use it, but what I meant was
kernel_size_1 = hp.Choice('kernel_size_1', [3, 5])
kernel_size = (1, kernel_size_1)
and then use kernel_size in the place you need it. If this does not work, would you elaborate a bit on what you are trying to do with a short code snippet? Thanks.
Right now I don't think hyperparameters take tuple in general, which I assume would cause some problem for some of the search algorithms.
Okay cool. Thanks a lot, i will try it out and let you know :)
@omalleyt12 @haifeng-jin Is there a reason for not supporting tuples?
I didn't know we are not supporting tuples. I think we are able to support anything that is naively serializable in python.
I am building a
ConvLSTM2D
for time series prediction and in that i need to check the results onkernel_size
(1,3)
and(1,5)
but i found out that the hp.Choice doesnt allow that. Is there any other way this can be done? I tried looking over the documentation but couldnt find anything that can help.Looking forward to hear from you soon. Thanks