From ftmleone at hotmail.com Thu Mar 1 03:23:44 2007 From: ftmleone at hotmail.com (Frank Leoné) Date: Thu Mar 1 03:23:49 2007 Subject: [pdp-discuss] Leabra: learning continous values over time? In-Reply-To: <200702052059.01762.Randy.OReilly@colorado.edu> Message-ID: Hello all, Everything is working quite well and I am learning all the time, but still the 'problem' of temporary switching off scalValar layers remains. More exactly: I want to be able to turn off the scalValar layers for all timesteps except the first. I tried two things uptill now: I tried to lesion the layer, depending on the timestep, using: if(.processes[8].tick.val==1).networks[0].layers[0].lesion=false; else ..networks[0].layers[0].lesion=true; In a loop-process in the sequence process. The second way I tried is to set the input to inactive, again depending on the timestep: if(.processes[8].tick.val==1).environments[0].event_specs[0].patterns[1].type=1; else .environments[0].event_specs[0].patterns[0].type=0; and also in a loop-process in the sequence process. The scripts do work, but the don't solve my problem. The first seems to keep sending the last seen signal, the second probably needs an 'update all events' action. And I do need the option, so I'm happy to hear you are planning to put it in the new version. Until then, is it possible to fix it using scripts(or an other way, except clamping the complete pattern)? I hope someone can help me, thanks a lot in advance! kind regards, Frank _________________________________________________________________ Live Search, for accurate results! http://www.live.nl From Randy.OReilly at colorado.edu Thu Mar 1 17:30:55 2007 From: Randy.OReilly at colorado.edu (Randall C. O'Reilly) Date: Thu Mar 1 17:31:00 2007 Subject: [pdp-discuss] Leabra: learning continous values over time? In-Reply-To: References: Message-ID: <200703011930.55937.Randy.OReilly@colorado.edu> Frank -- did you try setting the value to something very far above or below the min/max values?? that should make the gaussian bubble somewhere else and leave only the tail in the active units, i.e., mostly off. if that doesn't work it is only because of a range check in the code, which I'm sure you could quickly locate & disable by searching in the scalarvallayerspec code in leabra.cc for expressions involving that max or min value.. - Randy On Thursday 01 March 2007 05:23, Frank Leon? wrote: > Hello all, > > Everything is working quite well and I am learning all the time, but still > the 'problem' of temporary switching off scalValar layers remains. More > exactly: I want to be able to turn off the scalValar layers for all > timesteps except the first. > > I tried two things uptill now: I tried to lesion the layer, depending on > the timestep, using: > > if(.processes[8].tick.val==1).networks[0].layers[0].lesion=false; else > ..networks[0].layers[0].lesion=true; > > In a loop-process in the sequence process. > > The second way I tried is to set the input to inactive, again depending on > the timestep: > > if(.processes[8].tick.val==1).environments[0].event_specs[0].patterns[1].ty >pe=1; else .environments[0].event_specs[0].patterns[0].type=0; > > and also in a loop-process in the sequence process. > > The scripts do work, but the don't solve my problem. The first seems to > keep sending the last seen signal, the second probably needs an 'update all > events' action. > > And I do need the option, so I'm happy to hear you are planning to put it > in the new version. Until then, is it possible to fix it using scripts(or > an other way, except clamping the complete pattern)? I hope someone can > help me, thanks a lot in advance! > > kind regards, > > Frank > > _________________________________________________________________ > Live Search, for accurate results! http://www.live.nl > > _______________________________________________ > PDP-Discuss mailing list > PDP-Discuss@psych.Colorado.EDU > http://psych.colorado.edu/mailman/listinfo/pdp-discuss From ftmleone at hotmail.com Sat Mar 3 00:59:47 2007 From: ftmleone at hotmail.com (Frank Leoné) Date: Sat Mar 3 00:59:51 2007 Subject: [pdp-discuss] Leabra: learning continous values over time? In-Reply-To: <200703011930.55937.Randy.OReilly@colorado.edu> Message-ID: Hi! I did try to do so and indeed it represents above maximum values at its boundaries. I also looked into the code, because I also thought it would be just a boundary check, but couldn't find it. I will try to look at it again today, maybe I will find it this time :) What is restricted by the boundary btw.: the clamped unit or the rest of the layer? Because if it is the first, the boundary check is probably not directly encoded in the scalar val layer spec, but more likely in the unit spec and then it would be something I probably don't want to change. But I'll have a look and report my findings. Thanks for the answer! Frank _________________________________________________________________ Play online games with your friends with Messenger http://www.join.msn.com/messenger/overview From ftmleone at hotmail.com Sat Mar 3 06:17:24 2007 From: ftmleone at hotmail.com (Frank Leoné) Date: Sat Mar 3 06:17:28 2007 Subject: [pdp-discuss] Leabra: learning continous values over time? In-Reply-To: Message-ID: Hi all, I looked at the code and I understand what's happening, but I can't find where the boundaries are checked. The entire calculation seems to already assume the value is between the boundaries, though also in the unitspec no such check is made. Also if I look at the EXT-input of the first unit of the layer (in the Network-view), it is unbounded, so the limits are not unit-dependent, but vallayerspec dependent. Still I can't seem to find where it happens... Can someone help me? I really need this to work, thanks a lot in advance! Frank _________________________________________________________________ Live Search, for accurate results! http://www.live.nl From Randy.OReilly at colorado.edu Sat Mar 3 08:41:04 2007 From: Randy.OReilly at colorado.edu (Randall C. O'Reilly) Date: Sat Mar 3 08:41:12 2007 Subject: [pdp-discuss] Leabra: learning continous values over time? In-Reply-To: References: Message-ID: <200703031041.04621.Randy.OReilly@colorado.edu> void ScalarValLayerSpec::ClampValue(Unit_Group* ugp, LeabraTrial*, float rescale) { if(ugp->size < 3) return; // must be at least a few units.. LeabraUnit* u = (LeabraUnit*)ugp->FastEl(0); LeabraUnitSpec* us = (LeabraUnitSpec*)u->spec.spec; u->SetExtFlag(Unit::EXT); >>>> float val = val_range.Clip(u->ext); // first unit has the value to clamp scalar.InitVal(val, ugp->size, unit_range.min, unit_range.range); int i; for(i=1;isize;i++) { LeabraUnit* u = (LeabraUnit*)ugp->FastEl(i); float act = rescale * scalar.GetUnitAct(i); if(act < us->opt_thresh.send) act = 0.0f; u->SetExtFlag(Unit::EXT); u->ext = act; } } This is the key line of code (line 4784 in my leabra.cc file): float val = val_range.Clip(u->ext); // first unit has the value to clamp Change to: float val = u->ext; clip keeps it in range. - Randy On Saturday 03 March 2007 08:17, Frank Leon? wrote: > Hi all, > > I looked at the code and I understand what's happening, but I can't find > where the boundaries are checked. The entire calculation seems to already > assume the value is between the boundaries, though also in the unitspec no > such check is made. Also if I look at the EXT-input of the first unit of > the layer (in the Network-view), it is unbounded, so the limits are not > unit-dependent, but vallayerspec dependent. Still I can't seem to find > where it happens... > > Can someone help me? I really need this to work, > > thanks a lot in advance! > > Frank > > _________________________________________________________________ > Live Search, for accurate results! http://www.live.nl > > _______________________________________________ > PDP-Discuss mailing list > PDP-Discuss@psych.Colorado.EDU > http://psych.colorado.edu/mailman/listinfo/pdp-discuss From ftmleone at hotmail.com Sat Mar 3 12:43:30 2007 From: ftmleone at hotmail.com (Frank Leoné) Date: Sat Mar 3 12:43:33 2007 Subject: [pdp-discuss] Leabra: learning continous values over time? In-Reply-To: <200703031041.04621.Randy.OReilly@colorado.edu> Message-ID: Whow, thanks! I missed the fact that clipping held it in range, but now it works. Thanks a lot for the great help and fast replies! Have a nice weekend, kind regards, Frank _________________________________________________________________ Live Search, for accurate results! http://www.live.nl From ftmleone at hotmail.com Thu Mar 8 06:28:51 2007 From: ftmleone at hotmail.com (Frank Leoné) Date: Thu Mar 8 06:29:10 2007 Subject: [pdp-discuss] Turning off kwta in a leabra layer? In-Reply-To: <200703031041.04621.Randy.OReilly@colorado.edu> Message-ID: Hi to you all, Maybe a bit of a strange question, but is it possible turn kwta off for a leabralayer in PDP++? I want one of my layers to have complete freedom in its activation pattern, so without kwta. But I can't find how to do so. It is also not possible to add a non-leabra layer, even if it contains leabra units. Is their an option to turn kwta off, or, if not, can it be done by changing the k and i_kwta_pt? Possibly I'm missing something obvious here :S Thanks in advance, with kind regards, Frank _________________________________________________________________ Play online games with your friends with Messenger http://www.join.msn.com/messenger/overview From Randy.OReilly at colorado.edu Thu Mar 8 17:01:35 2007 From: Randy.OReilly at colorado.edu (Randall C. O'Reilly) Date: Thu Mar 8 17:01:40 2007 Subject: [pdp-discuss] Turning off kwta in a leabra layer? In-Reply-To: References: Message-ID: <200703081901.35599.Randy.OReilly@colorado.edu> set the inhib type to UNIT_INHIB. note, however, that this almost certainly won't work, without actually adding any inhibitory units -- you can try fiddling with the leak current to get it to not blow up, but good luck with that.. In which case, you are typically better off using one of the kwta functions, as you'll have to reduce the dt parameters significantly, etc. You might try AVG_MAX_PT_INHIB -- it has the most flexibility. - Randy On Thursday 08 March 2007 08:28, Frank Leon? wrote: > Hi to you all, > > Maybe a bit of a strange question, but is it possible turn kwta off for a > leabralayer in PDP++? I want one of my layers to have complete freedom in > its activation pattern, so without kwta. But I can't find how to do so. It > is also not possible to add a non-leabra layer, even if it contains leabra > units. Is their an option to turn kwta off, or, if not, can it be done by > changing the k and i_kwta_pt? Possibly I'm missing something obvious here > :S > > Thanks in advance, > > with kind regards, > > Frank > > _________________________________________________________________ > Play online games with your friends with Messenger > http://www.join.msn.com/messenger/overview > > _______________________________________________ > PDP-Discuss mailing list > PDP-Discuss@psych.Colorado.EDU > http://psych.colorado.edu/mailman/listinfo/pdp-discuss From monroe at usc.edu Tue Mar 13 15:37:39 2007 From: monroe at usc.edu (Brian Monroe) Date: Tue Mar 13 15:37:48 2007 Subject: [pdp-discuss] question about pruning/transforming weights Message-ID: <34a454760703131437o1137e9c8n498f02bd200de19b@mail.gmail.com> Hi, I would like to create a weight pattern similar to the effect one gets using the PruneCons function (using the example in the online documentation, this is exactly what I want to do, get rid of weights less than an absolute value threshold). But I don't want to necessarily get rid of the connections, I just want to set the weights to zero. Is there a simple way to do this? The available TransformWeights functions don't seem to have this capability as far as I can tell. Thanks in advance. Brian Monroe Graduate Student University of Southern California From Randy.OReilly at colorado.edu Tue Mar 13 15:58:19 2007 From: Randy.OReilly at colorado.edu (Randall C. O'Reilly) Date: Tue Mar 13 15:58:23 2007 Subject: [pdp-discuss] question about pruning/transforming weights In-Reply-To: <34a454760703131437o1137e9c8n498f02bd200de19b@mail.gmail.com> References: <34a454760703131437o1137e9c8n498f02bd200de19b@mail.gmail.com> Message-ID: <200703131758.20007.Randy.OReilly@colorado.edu> It doesn't look like this is a supported option. You could write a script to do it (just a bunch of for loops over layers, units, recv.gp's), or just copy and paste the PruneCons functions in src/netstru.h into a new function (ZeroCons?) and change the lowest level guy to do a cn->wt = 0 instead of DisconnectFrom.. - Randy On Tuesday 13 March 2007 17:37, Brian Monroe wrote: > Hi, > > I would like to create a weight pattern similar to the effect one gets > using the PruneCons function (using the example in the online > documentation, this is exactly what I want to do, get rid of weights > less than an absolute value threshold). But I don't want to > necessarily get rid of the connections, I just want to set the weights > to zero. Is there a simple way to do this? The available > TransformWeights functions don't seem to have this capability as far > as I can tell. Thanks in advance. > > Brian Monroe > Graduate Student > University of Southern California > _______________________________________________ > PDP-Discuss mailing list > PDP-Discuss@psych.Colorado.EDU > http://psych.colorado.edu/mailman/listinfo/pdp-discuss From ftmleone at hotmail.com Wed Mar 21 07:44:09 2007 From: ftmleone at hotmail.com (Frank Leoné) Date: Wed Mar 21 07:44:16 2007 Subject: [pdp-discuss] Error-tweaking & scalarvallayerspecs In-Reply-To: <200703081901.35599.Randy.OReilly@colorado.edu> Message-ID: Dear all, First of all I got a question, which is possibly useful for more people: how to tweak the error in a leabra network, in my case for scalar valars represented by gaussians? I know it helps to switch the opt thresh off and not use it for weight updating (in the unitspec settings). Also for me it helped a lot to lower the dt vm to 0.02, so really small. Also I tweaked the inhibition values using batch runs and turned soft bounding and symmetric weights off (especially the first helped quite a lot). More hidden units does not seem to help though. What is there I can do to further improve my error, because I'm not content with the result yet. Also, a more specific question, how can it be that my error rises when I lower the learning rate? I would expect it to go down, or maybe halt, but not rise. Hopefully someone can shine some light on this behaviour. In addition, something also possibly useful for others: I changed the code of the scalarvallayerspec and its 2D counterpart in order to remove the restriction of the activation, on the basis of the instruction given by O'Reilly (thanks once again). I also changed to code for both specs so that the width of the gaussian does not represent the absolute width, but the relative width with respect to the range of values represented. So, if the layer represents values from -100 to 100 and you would normally fill in 10 as width, you now fill in 0.1. If you than change the range of values, you don't have to change the width anymore if you want to keep the same ratio. This is especially useful in the 2D version, because you can only specify one width. This makes it impossible to get circular gaussians in 2D spec with different ranges on the axes. With the ratio instead of the absolute width, it does work. So, if anyone is interesting in this minor functionality tweak, I am happy to share it with you. With kind regards, Frank _________________________________________________________________ Live Search, for accurate results! http://www.live.nl From Randy.OReilly at colorado.edu Wed Mar 21 21:40:04 2007 From: Randy.OReilly at colorado.edu (Randall C. O'Reilly) Date: Wed Mar 21 21:40:09 2007 Subject: [pdp-discuss] Error-tweaking & scalarvallayerspecs In-Reply-To: References: Message-ID: <200703212340.04151.Randy.OReilly@colorado.edu> Lowering the learning rate usually helps in my experience -- I typically train to a rough asymptote at .01, then drop to .001, and get a big drop in error, consistent with the idea that there has been a lot of weight thrashing (interference) at the higher lrate. But you need the higher lrate to explore the space more thoroughly at the start -- if you just start at .001, it never does as well. The lrate_sched can be configured to do this for you automatically. I thought about doing the normalized width thing too... probably it is better that way. Send me your patches and I'll put them in 4.0. - Randy On Wednesday 21 March 2007 09:44, Frank Leon? wrote: > Dear all, > > First of all I got a question, which is possibly useful for more people: > how to tweak the error in a leabra network, in my case for scalar valars > represented by gaussians? > > I know it helps to switch the opt thresh off and not use it for weight > updating (in the unitspec settings). Also for me it helped a lot to lower > the dt vm to 0.02, so really small. Also I tweaked the inhibition values > using batch runs and turned soft bounding and symmetric weights off > (especially the first helped quite a lot). More hidden units does not seem > to help though. What is there I can do to further improve my error, because > I'm not content with the result yet. > > Also, a more specific question, how can it be that my error rises when I > lower the learning rate? I would expect it to go down, or maybe halt, but > not rise. Hopefully someone can shine some light on this behaviour. > > In addition, something also possibly useful for others: I changed the code > of the scalarvallayerspec and its 2D counterpart in order to remove the > restriction of the activation, on the basis of the instruction given by > O'Reilly (thanks once again). I also changed to code for both specs so that > the width of the gaussian does not represent the absolute width, but the > relative width with respect to the range of values represented. So, if the > layer represents values from -100 to 100 and you would normally fill in 10 > as width, you now fill in 0.1. If you than change the range of values, you > don't have to change the width anymore if you want to keep the same ratio. > This is especially useful in the 2D version, because you can only specify > one width. This makes it impossible to get circular gaussians in 2D spec > with different ranges on the axes. With the ratio instead of the absolute > width, it does work. > > So, if anyone is interesting in this minor functionality tweak, I am happy > to share it with you. > > With kind regards, > > Frank > > _________________________________________________________________ > Live Search, for accurate results! http://www.live.nl > > _______________________________________________ > PDP-Discuss mailing list > PDP-Discuss@psych.Colorado.EDU > http://psych.colorado.edu/mailman/listinfo/pdp-discuss