Hi guys,

I assume you all know the paper "DEEP LEARNING FOR SYMBOLIC MATHEMATICS"
by facebook AI researchers, almost one year ago, posted on
https://arxiv.org/abs/1912.01412

And the code was posted 8 months ago:
https://github.com/facebookresearch/SymbolicMathematics

Have you played with it?

Finally I have some time recently and played with it for a while,
and I believe I found some flaws. I will post my findings with
more details later. And it's a really interesting experience.

If you have some spare time and want to have fun, I strongly
advise you to play with it and try to break it :-)

Tips: to run the jupyter notebook example, apply the following
patch to run it on CPU instead of CUDA:

- Best,
- Qian

=====================

diff --git a/beam_integration.ipynb b/beam_integration.ipynb
index f9ef329..00754e3 100644
--- a/beam_integration.ipynb
+++ b/beam_integration.ipynb
@@ -64,6 +64,6 @@
     "\n",
     "    # model parameters\n",
-    "    'cpu': False,\n",
+    "    'cpu': True,\n",
     "    'emb_dim': 1024,\n",
     "    'n_enc_layers': 6,\n",
     "    'n_dec_layers': 6,\n",
diff --git a/src/model/__init__.py b/src/model/__init__.py
index 2b0a044..73ec446 100644
--- a/src/model/__init__.py
+++ b/src/model/__init__.py
@@ -38,7 +38,7 @@
     # reload pretrained modules
     if params.reload_model != '':
         logger.info(f"Reloading modules from {params.reload_model} ...")
-        reloaded = torch.load(params.reload_model)
+ reloaded = torch.load(params.reload_model, map_location=torch.device('cpu'))
         for k, v in modules.items():
             assert k in reloaded
if all([k2.startswith('module.') for k2 in reloaded[k].keys()]):
diff --git a/src/utils.py b/src/utils.py
index bd90608..ef87582 100644
--- a/src/utils.py
+++ b/src/utils.py
@@ -25,7 +25,7 @@
 FALSY_STRINGS = {'off', 'false', '0'}
 TRUTHY_STRINGS = {'on', 'true', '1'}

-CUDA = True
+CUDA = False


 class AttrDict(dict):

--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/7c33eab4-41f6-7d3f-0758-01a0bf9e641e%40gmail.com.

Reply via email to