Open ks2022ml opened 2 years ago
Dear ks2002ml,
I think it is a data format issue, as it is showing size 0. If you want, you can send me your data to take a look.
Best, Tianwei
Get Outlook for Androidhttps://aka.ms/AAb9ysg
From: ks2022ml @.> Sent: Friday, March 4, 2022 1:28:26 PM To: tianwei-yu/AIME @.> Cc: Subscribed @.***> Subject: [tianwei-yu/AIME] error in running AIME (Issue #1)
Hi Prof Yu
I was trying to run AIME using my own dataset but it seems to be running into some errors:
any help would be greatly appreciated!
Thank you!
`> b <- aime(data.in=X, data.out=Y, confounder=C, in.layers=3, out.layers=3, max.dropout=0.25, max.epochs=100, importance.permutations=5, ncomp=3) Model: "model"
Layer (type) Output Shape Param # Connected to
input_1 (InputLayer) [(None, 1000)] 0
dropout_2 (Dropout) (None, 1000) 0 input_1[0][0]
dense_2 (Dense) (None, 234) 234234 dropout_2[0][0]
dropout_1 (Dropout) (None, 234) 0 dense_2[0][0]
dense_1 (Dense) (None, 55) 12925 dropout_1[0][0]
dropout (Dropout) (None, 55) 0 dense_1[0][0]
dense (Dense) (None, 13) 728 dropout[0][0]
dropout_3 (Dropout) (None, 13) 0 dense[0][0]
dense_3 (Dense) (None, 3) 42 dropout_3[0][0]
aux_input (InputLayer) [(None, 10)] 0
concatenate (Concatenate) (None, 13) 0 dense_3[0][0] aux_input[0][0]
dropout_7 (Dropout) (None, 13) 0 concatenate[0][0]
dense_7 (Dense) (None, 4) 56 dropout_7[0][0]
dropout_6 (Dropout) (None, 4) 0 dense_7[0][0]
dense_6 (Dense) (None, 5) 25 dropout_6[0][0]
dropout_5 (Dropout) (None, 5) 0 dense_6[0][0]
dense_5 (Dense) (None, 6) 36 dropout_5[0][0]
dropout_4 (Dropout) (None, 6) 0 dense_5[0][0]
dense_4 (Dense) (None, 7) 49 dropout_4[0][0]
Total params: 248,095 Trainable params: 248,095 Non-trainable params: 0
Error in py_call_impl(callable, dots$args, dots$keywords) : ValueError: in user code:
/home/ks/anaconda3/envs/r-reticulate/lib/python3.9/site-packages/tensorflow/python/keras/engine/training.py:855 train_function * return step_function(self, iterator) /home/ks/anaconda3/envs/r-reticulate/lib/python3.9/site-packages/tensorflow/python/keras/engine/training.py:845 step_function ** outputs = model.distribute_strategy.run(run_step, args=(data,)) /home/ks/anaconda3/envs/r-reticulate/lib/python3.9/site-packages/tensorflow/python/distribute/distribute_lib.py:1285 run return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs) /home/ks/anaconda3/envs/r-reticulate/lib/python3.9/site-packages/tensorflow/python/distribute/distribute_lib.py:2833 call_for_each_replica return self._call_for_each_replica(fn, args, kwargs) /home/ks/anaconda3/envs/r-reticulate/lib/python3.9/site-packages/tensorflow/python/distribute/distribute_lib.py:3608 _call_for_each_replica retur`
— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianwei-yu%2FAIME%2Fissues%2F1&data=04%7C01%7C%7C56906102d2fc46e517e508d9fd9fcf65%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637819685091855519%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=EKaJ7c0D%2FB8tBRGHoMxKFWohz%2Flm5QzjcxTpp3Y%2BSrc%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAPXE4FZ2WTYAXDGBE6YIFPLU6GNPVANCNFSM5P4SD4ZA&data=04%7C01%7C%7C56906102d2fc46e517e508d9fd9fcf65%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637819685091855519%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=ee6wYFG1yV84z8rw7KNDDJbw%2F%2Fom6B0O45wrGhOsYYs%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7C56906102d2fc46e517e508d9fd9fcf65%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637819685091855519%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=zJrdJNKtPKe42cMZIehmG0WdiDI%2F6P2%2BJYwEmhtVv4I%3D&reserved=0 or Androidhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7C%7C56906102d2fc46e517e508d9fd9fcf65%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637819685091855519%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=m3vUVV4%2BGbehHdIi0277hB9VX%2BcGK%2BUdNyCyhOqJJtU%3D&reserved=0. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi Tianwei
I realised (2) could be resolved by converting Y to a matrix.
I still have a problem with issue (1) when layer.shrink.factor is used
b <- aime(data.in=X, data.out=Y, confounder = C, layer.shrink.factor=4, max.dropout=0.25, max.epochs=100, importance.permutations=5, ncomp=3) Error in create_layer(keras$layers$Dense, object, list(units = as.integer(units), : argument "units" is missing, with no default
3) Does the number of samples need to be smaller than the number of features as it seems to causes an error when that is the case.
Thank you.
Hi ks2022ml,
Regarding (3), I cannot duplicate the issue. I tried both larger and smaller. Well couldn’t do that for (2) either. Did you try to convert X to a matrix also? If that doesn’t work, can you send me your code?
Best, Tianwei
发件人: @.> 发送时间: Wednesday, March 9, 2022 12:20 PM 收件人: @.> 抄送: @.>; @.> 主题: Re: [tianwei-yu/AIME] error in running AIME (Issue #1)
Hi Tianwei
I realised (2) could be resolved by converting Y to a matrix.
I still have a problem with issue (1) when layer.shrink.factor is used
b <- aime(data.in=X, data.out=Y, confounder = C, layer.shrink.factor=4, max.dropout=0.25, max.epochs=100, importance.permutations=5, ncomp=3) Error in create_layer(keras$layers$Dense, object, list(units = as.integer(units), : argument "units" is missing, with no default
Thank you.
― Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianwei-yu%2FAIME%2Fissues%2F1%23issuecomment-1062539501&data=04%7C01%7C%7Cfddda35f9d9d471f25dd08da01843015%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637823964498592638%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=gJ0Nd39qAHJ9%2FSyOBcJb99bOVs2mWz8uYzOGlmIUpj8%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAPXE4F55EY62LJIRLZ2OV7TU7ARJ7ANCNFSM5P4SD4ZA&data=04%7C01%7C%7Cfddda35f9d9d471f25dd08da01843015%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637823964498592638%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Ikw0jFtl%2BjoR2Tq0ns7ZjLdSLr5jeKuSDYhrHJ8Mlxs%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7Cfddda35f9d9d471f25dd08da01843015%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637823964498592638%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=CHxMlpm%2FJLCPdSPXEZEjZaGZWN2%2BxMmBxD5UOyy7mMs%3D&reserved=0 or Androidhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7C%7Cfddda35f9d9d471f25dd08da01843015%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637823964498592638%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=zYoqvfy%2BdyBwyQFoAiqgBHoO%2BxBsCk4t5QmqVI3HgNI%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>
Hi Prof Yu
I was trying to run AIME using my own dataset but it seems to be running into some errors:
any help would be greatly appreciated!
Thank you!
`> b <- aime(data.in=X, data.out=Y, confounder=C, in.layers=3, out.layers=3, max.dropout=0.25, max.epochs=100, importance.permutations=5, ncomp=3) Model: "model"
Layer (type) Output Shape Param # Connected to
input_1 (InputLayer) [(None, 1000)] 0
dropout_2 (Dropout) (None, 1000) 0 input_1[0][0]
dense_2 (Dense) (None, 234) 234234 dropout_2[0][0]
dropout_1 (Dropout) (None, 234) 0 dense_2[0][0]
dense_1 (Dense) (None, 55) 12925 dropout_1[0][0]
dropout (Dropout) (None, 55) 0 dense_1[0][0]
dense (Dense) (None, 13) 728 dropout[0][0]
dropout_3 (Dropout) (None, 13) 0 dense[0][0]
dense_3 (Dense) (None, 3) 42 dropout_3[0][0]
aux_input (InputLayer) [(None, 10)] 0
concatenate (Concatenate) (None, 13) 0 dense_3[0][0]
aux_input[0][0]
dropout_7 (Dropout) (None, 13) 0 concatenate[0][0]
dense_7 (Dense) (None, 4) 56 dropout_7[0][0]
dropout_6 (Dropout) (None, 4) 0 dense_7[0][0]
dense_6 (Dense) (None, 5) 25 dropout_6[0][0]
dropout_5 (Dropout) (None, 5) 0 dense_6[0][0]
dense_5 (Dense) (None, 6) 36 dropout_5[0][0]
dropout_4 (Dropout) (None, 6) 0 dense_5[0][0]
dense_4 (Dense) (None, 7) 49 dropout_4[0][0]
Total params: 248,095 Trainable params: 248,095 Non-trainable params: 0
Error in py_call_impl(callable, dots$args, dots$keywords) : ValueError: in user code: