Skip to main content
formatting
Source Link
rcollyer
  • 34.1k
  • 7
  • 94
  • 194

Perhaps this question may be of use to future visitors. I had assumed that using

Needs["NeuralNetworks`"]

Needs["NeuralNetworks`"]

or

BeginPackage["MyNeuralNetworks",{"NeuralNetworks"}]

BeginPackage["MyNeuralNetworks`",{"NeuralNetworks`"}]

was sufficient to establish the $ContextPath for my package; however when I loaded the neural networks package into a notebook, I noticed:

$ContextPath
{"NeuralNetworks`VQ`", "NeuralNetworks`UnsupervisedNet`", "NeuralNetworks`Perceptron`",
   "NeuralNetworks`NeuralFit`", "NeuralNetworks`Hopfield`",
   "NeuralNetworks`FeedForwardRBFNet`", "NeuralNetworks`DynamicNet`", 
    "NeuralNetworks`Common`", "NeuralNetworks`CommonCBV`", "NeuralNetworks`", ...}

I wrongfully thought that Needing NeuralNetworksNeuralNetworks` would automatically include the rest of the needed packages into my context. Explicitly including all of the neural network packages in my custom package did the trick:

BeginPackage["MyNeuralNetwork`",{"NeuralNetworks`VQ`", "NeuralNetworks`UnsupervisedNet`", 
   "NeuralNetworks`Perceptron`", "NeuralNetworks`NeuralFit`",
   "NeuralNetworks`Hopfield`", "NeuralNetworks`FeedForwardRBFNet`",
   "NeuralNetworks`DynamicNet`", "NeuralNetworks`Common`",
   "NeuralNetworks`CommonCBV`", "NeuralNetworks`"}]

Perhaps this question may be of use to future visitors. I had assumed that using

Needs["NeuralNetworks`"]

or

BeginPackage["MyNeuralNetworks",{"NeuralNetworks"}]

was sufficient to establish the $ContextPath for my package; however when I loaded the neural networks package into a notebook, I noticed:

$ContextPath
{"NeuralNetworks`VQ`", "NeuralNetworks`UnsupervisedNet`", "NeuralNetworks`Perceptron`",
   "NeuralNetworks`NeuralFit`", "NeuralNetworks`Hopfield`",
   "NeuralNetworks`FeedForwardRBFNet`", "NeuralNetworks`DynamicNet`", 
    "NeuralNetworks`Common`", "NeuralNetworks`CommonCBV`", "NeuralNetworks`", ...}

I wrongfully thought that Needing NeuralNetworks would automatically include the rest of the needed packages into my context. Explicitly including all of the neural network packages in my custom package did the trick:

BeginPackage["MyNeuralNetwork`",{"NeuralNetworks`VQ`", "NeuralNetworks`UnsupervisedNet`", 
   "NeuralNetworks`Perceptron`", "NeuralNetworks`NeuralFit`",
   "NeuralNetworks`Hopfield`", "NeuralNetworks`FeedForwardRBFNet`",
   "NeuralNetworks`DynamicNet`", "NeuralNetworks`Common`",
   "NeuralNetworks`CommonCBV`", "NeuralNetworks`"}]

Perhaps this question may be of use to future visitors. I had assumed that using

Needs["NeuralNetworks`"]

or

BeginPackage["MyNeuralNetworks`",{"NeuralNetworks`"}]

was sufficient to establish the $ContextPath for my package; however when I loaded the neural networks package into a notebook, I noticed:

$ContextPath
{"NeuralNetworks`VQ`", "NeuralNetworks`UnsupervisedNet`", "NeuralNetworks`Perceptron`",
   "NeuralNetworks`NeuralFit`", "NeuralNetworks`Hopfield`",
   "NeuralNetworks`FeedForwardRBFNet`", "NeuralNetworks`DynamicNet`", 
    "NeuralNetworks`Common`", "NeuralNetworks`CommonCBV`", "NeuralNetworks`", ...}

I wrongfully thought that Needing NeuralNetworks` would automatically include the rest of the needed packages into my context. Explicitly including all of the neural network packages in my custom package did the trick:

BeginPackage["MyNeuralNetwork`",{"NeuralNetworks`VQ`", "NeuralNetworks`UnsupervisedNet`", 
   "NeuralNetworks`Perceptron`", "NeuralNetworks`NeuralFit`",
   "NeuralNetworks`Hopfield`", "NeuralNetworks`FeedForwardRBFNet`",
   "NeuralNetworks`DynamicNet`", "NeuralNetworks`Common`",
   "NeuralNetworks`CommonCBV`", "NeuralNetworks`"}]
Source Link
bobthechemist
  • 19.8k
  • 4
  • 56
  • 140

Perhaps this question may be of use to future visitors. I had assumed that using

Needs["NeuralNetworks`"]

or

BeginPackage["MyNeuralNetworks",{"NeuralNetworks"}]

was sufficient to establish the $ContextPath for my package; however when I loaded the neural networks package into a notebook, I noticed:

$ContextPath
{"NeuralNetworks`VQ`", "NeuralNetworks`UnsupervisedNet`", "NeuralNetworks`Perceptron`",
   "NeuralNetworks`NeuralFit`", "NeuralNetworks`Hopfield`",
   "NeuralNetworks`FeedForwardRBFNet`", "NeuralNetworks`DynamicNet`", 
    "NeuralNetworks`Common`", "NeuralNetworks`CommonCBV`", "NeuralNetworks`", ...}

I wrongfully thought that Needing NeuralNetworks would automatically include the rest of the needed packages into my context. Explicitly including all of the neural network packages in my custom package did the trick:

BeginPackage["MyNeuralNetwork`",{"NeuralNetworks`VQ`", "NeuralNetworks`UnsupervisedNet`", 
   "NeuralNetworks`Perceptron`", "NeuralNetworks`NeuralFit`",
   "NeuralNetworks`Hopfield`", "NeuralNetworks`FeedForwardRBFNet`",
   "NeuralNetworks`DynamicNet`", "NeuralNetworks`Common`",
   "NeuralNetworks`CommonCBV`", "NeuralNetworks`"}]