Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uvaSeg not working #14

Open
muschellij2 opened this issue Jan 30, 2020 · 0 comments
Open

uvaSeg not working #14

muschellij2 opened this issue Jan 30, 2020 · 0 comments

Comments

@muschellij2
Copy link
Contributor

library(ANTsRNet)
library(ANTsR)
#> Loading required package: ANTsRCore
#> 
#> Attaching package: 'ANTsRCore'
#> The following objects are masked from 'package:stats':
#> 
#>     sd, var
#> The following objects are masked from 'package:base':
#> 
#>     all, any, apply, max, min, prod, range, sum
img <- ri( 1 ) %>% resampleImage( c(4,4) ) %>% iMath( "Normalize" )
mask = randomMask( getMask( img ), 50 )
r = c( 3, 3 )
patch = getNeighborhoodInMask( img, mask, r, boundary.condition = "NA" )
uvaSegModel = uvaSegTrain( patch, 6 )
#> Error in py_call_impl(callable, dots$args, dots$keywords): _SymbolicException: Inputs to eager execution function cannot be Keras symbolic tensors, but found [<tf.Tensor 'dense_2/Identity:0' shape=(None, 6) dtype=float32>, <tf.Tensor 'dense_1/Identity:0' shape=(None, 6) dtype=float32>]
#> 
#> Detailed traceback: 
#>   File "/Users/johnmuschelli/.virtualenvs/r-reticulate/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training.py", line 728, in fit
#>     use_multiprocessing=use_multiprocessing)
#>   File "/Users/johnmuschelli/.virtualenvs/r-reticulate/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2.py", line 324, in fit
#>     total_epochs=epochs)
#>   File "/Users/johnmuschelli/.virtualenvs/r-reticulate/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2.py", line 123, in run_one_epoch
#>     batch_outs = execution_function(iterator)
#>   File "/Users/johnmuschelli/.virtualenvs/r-reticulate/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2_utils.py", line 86, in execution_function
#>     distributed_function(input_fn))
#>   File "/Users/johnmuschelli/.virtualenvs/r-reticulate/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py", line 457, in __call__
#>     result = self._call(*args, **kwds)
#>   File "/Users/johnmuschelli/.virtualenvs/r-reticulate/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py", line 520, in _call
#>     return self._stateless_fn(*args, **kwds)
#>   File "/Users/johnmuschelli/.virtualenvs/r-reticulate/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py", line 1823, in __call__
#>     return graph_function._filtered_call(args, kwargs)  # pylint: disable=protected-access
#>   File "/Users/johnmuschelli/.virtualenvs/r-reticulate/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py", line 1141, in _filtered_call
#>     self.captured_inputs)
#>   File "/Users/johnmuschelli/.virtualenvs/r-reticulate/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py", line 1224, in _call_flat
#>     ctx, args, cancellation_manager=cancellation_manager)
#>   File "/Users/johnmuschelli/.virtualenvs/r-reticulate/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py", line 511, in call
#>     ctx=ctx)
#>   File "/Users/johnmuschelli/.virtualenvs/r-reticulate/lib/python3.7/site-packages/tensorflow_core/python/eager/execute.py", line 75, in quick_execute
#>     "tensors, but found {}".format(keras_symbolic_tensors))

Created on 2020-01-30 by the reprex package (v0.3.0.9001)

Session info
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value                       
#>  version  R version 3.6.0 (2019-04-26)
#>  os       macOS Mojave 10.14.6        
#>  system   x86_64, darwin15.6.0        
#>  ui       X11                         
#>  language (EN)                        
#>  collate  en_US.UTF-8                 
#>  ctype    en_US.UTF-8                 
#>  tz       America/New_York            
#>  date     2020-01-30                  
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package     * version     date       lib source                             
#>  ANTsR       * 0.5.4.2     2019-11-14 [1] local                              
#>  ANTsRCore   * 0.7.3       2019-12-11 [1] Github (ANTsX/ANTsRCore@416d8f1)   
#>  ANTsRNet    * 1.1         2020-01-30 [1] local                              
#>  assertthat    0.2.1       2019-03-21 [1] CRAN (R 3.6.0)                     
#>  backports     1.1.5       2019-10-02 [1] CRAN (R 3.6.0)                     
#>  base64enc     0.1-3       2015-07-28 [1] CRAN (R 3.6.0)                     
#>  cli           2.0.1       2020-01-08 [1] CRAN (R 3.6.0)                     
#>  crayon        1.3.4       2017-09-16 [1] CRAN (R 3.6.0)                     
#>  digest        0.6.23      2019-11-23 [1] CRAN (R 3.6.0)                     
#>  evaluate      0.14        2019-05-28 [1] CRAN (R 3.6.0)                     
#>  fansi         0.4.1       2020-01-08 [1] CRAN (R 3.6.0)                     
#>  fs            1.3.1       2019-05-06 [1] CRAN (R 3.6.0)                     
#>  generics      0.0.2       2018-11-29 [1] CRAN (R 3.6.0)                     
#>  glue          1.3.1       2019-03-12 [1] CRAN (R 3.6.0)                     
#>  highr         0.8         2019-03-20 [1] CRAN (R 3.6.0)                     
#>  htmltools     0.4.0       2019-10-04 [1] CRAN (R 3.6.0)                     
#>  ITKR          0.5.2       2019-11-05 [1] Github (stnava/ITKR@fe97efa)       
#>  jsonlite      1.6         2018-12-07 [1] CRAN (R 3.6.0)                     
#>  keras         2.2.5.0     2019-10-08 [1] CRAN (R 3.6.0)                     
#>  knitr         1.26.1      2020-01-05 [1] Github (muschellij2/knitr@f5af631) 
#>  lattice       0.20-38     2018-11-04 [1] CRAN (R 3.6.0)                     
#>  magrittr      1.5         2014-11-22 [1] CRAN (R 3.6.0)                     
#>  Matrix        1.2-17      2019-03-22 [1] CRAN (R 3.6.0)                     
#>  mvtnorm       1.0-11      2019-06-19 [1] CRAN (R 3.6.0)                     
#>  pillar        1.4.3       2019-12-20 [1] CRAN (R 3.6.0)                     
#>  pkgconfig     2.0.3       2019-09-22 [1] CRAN (R 3.6.0)                     
#>  purrr         0.3.3       2019-10-18 [1] CRAN (R 3.6.0)                     
#>  R6            2.4.1       2019-11-12 [1] CRAN (R 3.6.0)                     
#>  Rcpp          1.0.3       2019-11-08 [1] CRAN (R 3.6.0)                     
#>  RcppEigen     0.3.3.7.0   2019-11-16 [1] CRAN (R 3.6.0)                     
#>  reprex        0.3.0.9001  2020-01-05 [1] Github (tidyverse/reprex@5ae0b29)  
#>  reticulate    1.13        2019-07-24 [1] CRAN (R 3.6.0)                     
#>  rlang         0.4.2       2019-11-23 [1] CRAN (R 3.6.0)                     
#>  rmarkdown     2.0.7       2020-01-17 [1] Github (rstudio/rmarkdown@2faf16a) 
#>  rstudioapi    0.10.0-9003 2020-01-05 [1] Github (rstudio/rstudioapi@abe596d)
#>  sessioninfo   1.1.1       2018-11-05 [1] CRAN (R 3.6.0)                     
#>  stringi       1.4.5       2020-01-11 [1] CRAN (R 3.6.0)                     
#>  stringr       1.4.0       2019-02-10 [1] CRAN (R 3.6.0)                     
#>  styler        1.1.1       2019-05-06 [1] CRAN (R 3.6.0)                     
#>  tensorflow    2.0.0       2019-10-02 [1] CRAN (R 3.6.0)                     
#>  tfruns        1.4         2018-08-25 [1] CRAN (R 3.6.0)                     
#>  tibble        2.1.3       2019-06-06 [1] CRAN (R 3.6.0)                     
#>  whisker       0.4         2019-08-28 [1] CRAN (R 3.6.0)                     
#>  withr         2.1.2       2018-03-15 [1] CRAN (R 3.6.0)                     
#>  xfun          0.11        2019-11-12 [1] CRAN (R 3.6.0)                     
#>  yaml          2.2.0       2018-07-25 [1] CRAN (R 3.6.0)                     
#>  zeallot       0.1.0       2018-01-28 [1] CRAN (R 3.6.0)                     
#> 
#> [1] /Library/Frameworks/R.framework/Versions/3.6/Resources/library
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant