René's URL Explorer Experiment


Title: Cannot apply element-wise operator Add · Issue #39 · DeepMLNet/DeepNet · GitHub

Open Graph Title: Cannot apply element-wise operator Add · Issue #39 · DeepMLNet/DeepNet

X Title: Cannot apply element-wise operator Add · Issue #39 · DeepMLNet/DeepNet

Description: I examined DeepNet sample code referenced by (http://www.deepml.net/model.html) However, I executed my code and got System.Exception. Additional information was as follows: cannot apply element-wise operation Add to unequal shapes ["nHid...

Open Graph Description: I examined DeepNet sample code referenced by (http://www.deepml.net/model.html) However, I executed my code and got System.Exception. Additional information was as follows: cannot apply element-wis...

X Description: I examined DeepNet sample code referenced by (http://www.deepml.net/model.html) However, I executed my code and got System.Exception. Additional information was as follows: cannot apply element-wis...

Opengraph URL: https://github.com/DeepMLNet/DeepNet/issues/39

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cannot apply element-wise operator Add","articleBody":"I examined DeepNet sample code referenced by (http://www.deepml.net/model.html)\r\n\r\nHowever, I executed my code and got System.Exception. Additional information was as follows:\r\n\r\n```\r\ncannot apply element-wise operation Add to unequal shapes [\"nHidden\"; \"nBatch\"] and [\"nHidden\"; \"nHidden\"]\r\n```\r\nThe exception occurred at `let hiddenAct = hiddenWeights .* input.T + hiddenBias`\r\nI expect `hiddenBias` will be `[nHidden; nBatch]` shapes, but `[nHidden; nHidden]`.\r\n\r\nMy complete code is as follows:\r\n\r\n```fsharp\r\nopen Tensor\r\nopen Datasets\r\nopen SymTensor\r\n\r\n[\u003cEntryPoint\u003e]\r\nlet main argv = \r\n    printfn \"%A\" argv\r\n\r\n    let a = HostTensor.init [7L; 5L] (fun [|i; j|] -\u003e 5.0 * float i + float j) \r\n\r\n    /// MINST Dataset\r\n    let mnist = Mnist.load(__SOURCE_DIRECTORY__ + \"../../MNIST\") 0.0 |\u003e TrnValTst.toHost\r\n    \r\n    printfn \"MNIST training set: images have shape %A and labels have shape %A\" mnist.Trn.All.Input.Shape mnist.Trn.All.Target.Shape   \r\n    printfn \"MNIST test set    : images have shape %A and labels have shape %A\" mnist.Tst.All.Input.Shape mnist.Tst.All.Target.Shape\r\n\r\n    /// Definition NeuralNetModel\r\n    let mb = ModelBuilder\u003csingle\u003e \"NeuralNetModel\"\r\n\r\n    // Definition symbol\r\n    let nBatch  = mb.Size \"nBatch\"\r\n    let nInput  = mb.Size \"nInput\"\r\n    let nClass  = mb.Size \"nClass\"\r\n    let nHidden = mb.Size \"nHidden\"\r\n\r\n    // Model paramaters\r\n    let hiddenWeights = mb.Param (\"hiddenWeights\", [nHidden; nInput])\r\n    let hiddenBias    = mb.Param (\"hiddenBias\"   , [nHidden])\r\n    let outputWeights = mb.Param (\"outputWeights\", [nClass; nHidden])\r\n\r\n    // Model variables\r\n    let input  = mb.Var\u003csingle\u003e \"Input\"  [nBatch; nInput]\r\n    let target = mb.Var\u003csingle\u003e \"Target\" [nBatch; nClass]\r\n\r\n    // Generating model\r\n    mb.SetSize nInput mnist.Trn.All.Input.Shape.[1]\r\n    mb.SetSize nClass mnist.Trn.All.Target.Shape.[1]\r\n    mb.SetSize nHidden 100L\r\n\r\n    let mi = mb.Instantiate DevHost\r\n\r\n    // Definition model action in input -\u003e hidden\r\n    let hiddenAct = hiddenWeights .* input.T + hiddenBias // \u003c--------- Exception occurrs!!!\r\n    let hiddenVal = tanh hiddenAct\r\n\r\n    // Definition model action in hidden -\u003e output\r\n    let outputAct = outputWeights .* hiddenVal\r\n    let classProb = exp outputAct / Expr.sumKeepingAxis 0 (exp outputAct)\r\n\r\n    // Loss function\r\n    let smplLoss = - Expr.sumAxis 0 (target.T * log classProb)\r\n    let loss     = Expr.mean smplLoss\r\n\r\n    // Compile\r\n    let lossFn   = mi.Func loss |\u003e arg2 input target\r\n\r\n    // Initialization with seed\r\n    mi.InitPars 123\r\n\r\n    // test\r\n    let tstLossUntrained = lossFn mnist.Tst.All.Input mnist.Tst.All.Target |\u003e Tensor.value\r\n\r\n    printfn \"Test loss (untrained): %.4f\" tstLossUntrained\r\n\r\n    System.Console.ReadKey() |\u003e ignore\r\n    0 // exit code\r\n```\r\n\r\nMy environment are as follows:\r\n\r\n* Windows 7 (64bit)\r\n* Visual Studio 2015\r\n* Installed DeepNet via Nuget\r\n* Installed FSharp.Core(F# 4.1) via Nuget\r\n\r\nI'm sorry if I'm misunderstanding about your sophisticated library.\r\nCould you please let me know how to fix this problem?\r\n \r\n","author":{"url":"https://github.com/kuroyakov","@type":"Person","name":"kuroyakov"},"datePublished":"2017-05-22T03:18:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/39/DeepNet/issues/39"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:251a4f1e-a3f2-c441-ff38-57688f627697
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8994:364A6C:6F764:91F84:69771E1E
html-safe-nonce5d81aa806147356099bafc1f495e8ee4dd60bd12cced7fe1d9be415046757e3b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OTk0OjM2NEE2Qzo2Rjc2NDo5MUY4NDo2OTc3MUUxRSIsInZpc2l0b3JfaWQiOiI1MzMzOTE4OTA3NDE5MjcwNjg2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac07a0a747a514d90cddf81a7d9345727de3cdae1cae6c4b609c88b2a0b124b102
hovercard-subject-tagissue:230274904
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/DeepMLNet/DeepNet/39/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d40e92a1115cae5cc4760182dfe622eb66b0977a39be6666fbf8a4d3b0640b2a/DeepMLNet/DeepNet/issues/39
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d40e92a1115cae5cc4760182dfe622eb66b0977a39be6666fbf8a4d3b0640b2a/DeepMLNet/DeepNet/issues/39
og:image:altI examined DeepNet sample code referenced by (http://www.deepml.net/model.html) However, I executed my code and got System.Exception. Additional information was as follows: cannot apply element-wis...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamekuroyakov
hostnamegithub.com
expected-hostnamegithub.com
None01d198479908d09a841b2febe8eb105a81af2af7d81830960fe0971e1f4adc09
turbo-cache-controlno-preview
go-importgithub.com/DeepMLNet/DeepNet git https://github.com/DeepMLNet/DeepNet.git
octolytics-dimension-user_id19489749
octolytics-dimension-user_loginDeepMLNet
octolytics-dimension-repository_id59478684
octolytics-dimension-repository_nwoDeepMLNet/DeepNet
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id59478684
octolytics-dimension-repository_network_root_nwoDeepMLNet/DeepNet
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef752335dbbea672610081196a1998e39aec5e14b
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/DeepMLNet/DeepNet/issues/39#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FDeepMLNet%2FDeepNet%2Fissues%2F39
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FDeepMLNet%2FDeepNet%2Fissues%2F39
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=DeepMLNet%2FDeepNet
Reloadhttps://patch-diff.githubusercontent.com/DeepMLNet/DeepNet/issues/39
Reloadhttps://patch-diff.githubusercontent.com/DeepMLNet/DeepNet/issues/39
Reloadhttps://patch-diff.githubusercontent.com/DeepMLNet/DeepNet/issues/39
DeepMLNet https://patch-diff.githubusercontent.com/DeepMLNet
DeepNethttps://patch-diff.githubusercontent.com/DeepMLNet/DeepNet
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2FDeepMLNet%2FDeepNet
Fork 9 https://patch-diff.githubusercontent.com/login?return_to=%2FDeepMLNet%2FDeepNet
Star 101 https://patch-diff.githubusercontent.com/login?return_to=%2FDeepMLNet%2FDeepNet
Code https://patch-diff.githubusercontent.com/DeepMLNet/DeepNet
Issues 4 https://patch-diff.githubusercontent.com/DeepMLNet/DeepNet/issues
Pull requests 1 https://patch-diff.githubusercontent.com/DeepMLNet/DeepNet/pulls
Actions https://patch-diff.githubusercontent.com/DeepMLNet/DeepNet/actions
Projects 0 https://patch-diff.githubusercontent.com/DeepMLNet/DeepNet/projects
Security 0 https://patch-diff.githubusercontent.com/DeepMLNet/DeepNet/security
Insights https://patch-diff.githubusercontent.com/DeepMLNet/DeepNet/pulse
Code https://patch-diff.githubusercontent.com/DeepMLNet/DeepNet
Issues https://patch-diff.githubusercontent.com/DeepMLNet/DeepNet/issues
Pull requests https://patch-diff.githubusercontent.com/DeepMLNet/DeepNet/pulls
Actions https://patch-diff.githubusercontent.com/DeepMLNet/DeepNet/actions
Projects https://patch-diff.githubusercontent.com/DeepMLNet/DeepNet/projects
Security https://patch-diff.githubusercontent.com/DeepMLNet/DeepNet/security
Insights https://patch-diff.githubusercontent.com/DeepMLNet/DeepNet/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/DeepMLNet/DeepNet/issues/39
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/DeepMLNet/DeepNet/issues/39
Cannot apply element-wise operator Addhttps://patch-diff.githubusercontent.com/DeepMLNet/DeepNet/issues/39#top
https://github.com/kuroyakov
https://github.com/kuroyakov
kuroyakovhttps://github.com/kuroyakov
on May 22, 2017https://github.com/DeepMLNet/DeepNet/issues/39#issue-230274904
http://www.deepml.net/model.htmlhttp://www.deepml.net/model.html
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.