thao p nguyen created SINGA-445: ----------------------------------- Summary: can not run Singa module example Key: SINGA-445 URL: https://issues.apache.org/jira/browse/SINGA-445 Project: Singa Issue Type: Bug Components: Documentation Environment: - Ubuntu 18.10 - python 3.6 Reporter: thao p nguyen
Following the latest Singa documentation's examples on running modules, below error was found for running module Metric: >>> from singa import tensor >>> from singa import metric >>> x = tensor.Tensor((3, 5)) >>> x.uniform(0, 1) # randomly generate the prediction activation >>> x = tensor.SoftMax # normalize the prediction into probabilities Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: module 'singa.tensor' has no attribute 'SoftMax' >>> y = tensor.from_numpy(np.array([0, 1, 3], dtype=np.int)) # set the truth Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'np' is not defined >>> >>> f = metric.Accuracy() >>> acc = f.evaluate(x, y) # averaged accuracy over all 3 samples in x -- This message was sent by Atlassian JIRA (v7.6.3#76005)